The name of the edit task.
[Visual Basic 6.0] Property Name As String
[Visual Basic .NET] Public ReadOnly Property Name As String
[C#] public string Name {get;}
The Name property is usually used with IEdtior::TaskCount and IEditor::Task to change the editor's current task. It is not a good idea to set an edit task via its index as this may change and is likely different for different users.
Sample to change the current edit task.
private void settask() if (tEditTask.Name == "Reshape Feature")
{
tEditor.CurrentTask = tEditTask;
break;
}
}
}
catch (exception e)
{
MessageBox.Show("Unable to change the task." + e.ToString());
}
}
Public Sub SetTask()
Dim pEditor As IEditor
Dim pEditTask As IEditTask
Dim pID As New UID
Dim TaskCount As Integer
pID = "esriEditor.Editor"
Set pEditor = Application.FindExtensionByCLSID(pID)
'Loop through the edit tasks checking each one's name
For TaskCount = 0 To pEditor.TaskCount - 1
Set pEditTask = pEditor.Task(TaskCount)
If pEditTask.Name = "Reshape Feature" Then
Set pEditor.CurrentTask = pEditTask
Exit Sub
End If
Next TaskCount
End Sub
IEditTask Interface | IEditTask Interface | IEditSketch Interface | IExtension Interface | esriSketchConstraint Constants | ISketchTool Interface