public sealed class ExportTaskException : TaskException, System.Runtime.Serialization.ISerializable
Public NotInheritable Class ExportTaskException Inherits TaskException Implements System.Runtime.Serialization.ISerializable
public sealed class ExportTaskException : TaskException, System.Runtime.Serialization.ISerializable
Public NotInheritable Class ExportTaskException Inherits TaskException Implements System.Runtime.Serialization.ISerializable
// get the first project task item var taskItem = Project.Current.GetItems<TaskProjectItem>().FirstOrDefault(); // if there isn't a project task item, return if (taskItem == null) return; try { // export the task item to the c:\Temp folder string exportFolder = @"c:\temp"; //At 2.x - //string fileName = await TaskAssistantModule.ExportTaskAsync(taskItem.TaskItemGuid, exportFolder); string fileName = await TaskAssistantFactory.Instance.ExportTaskItemAsync(taskItem.TaskItemGuid, exportFolder); ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("Task saved to " + fileName); } catch (ExportTaskException e) { ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("Error saving task " + e.Message); }
System.Object
System.Exception
ArcGIS.Desktop.TaskAssistant.Exceptions.TaskException
ArcGIS.Desktop.TaskAssistant.Exceptions.ExportTaskException
Target Platforms: Windows 11, Windows 10