Parameters
- taskFile
- Full path to an .esriTasks file.
Return Value
A flag indicating if the task file can be opened.
// Open a task file try { // TODO - substitute your own .esriTasks file to be opened string taskFile = @"c:\Tasks\Get Started.esriTasks"; //At 2.x - //System.Guid guid = await TaskAssistantModule.OpenTaskAsync(taskFile); System.Guid guid; if (TaskAssistantFactory.Instance.CanOpenTaskFile(taskFile)) guid = await TaskAssistantFactory.Instance.OpenTaskFileAsync(taskFile); // TODO - retain the guid returned for use with CloseTaskItemAsync } catch (OpenTaskException e) { // exception thrown if task file doesn't exist or has incorrect format ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(e.Message); }
Target Platforms: Windows 11, Windows 10