This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > IE > IEditTask Interface > IEditTask.Name Property (ArcObjects .NET 10.5 SDK) |
The name of the edit task.
[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()
{
try
{
IEditor tEditor;
//get a reference to IApplication app using ICommand::OnCreate hook parameter.
tEditor=app.FindExtensionByName("ESRI Object Editor") as IEditor;
IEditTask tEditTask=tEditor.CurrentTask;
for (int taskCount=0; taskCount < tEditor.TaskCount; taskCount++)
{
tEditTask=tEditor.get_Task(taskCount);
if (tEditTask.Name == "Reshape Feature")
{
tEditor.CurrentTask=tEditTask;
break;
}
}
}
catch (exception e)
{
MessageBox.Show("Unable to change the task." + e.ToString());
}
}
IEditTask Interface | IEditTask Interface | IEditSketch Interface | IExtension Interface | esriSketchConstraint Constants | ISketchTool Interface | IEditTaskSearch Interface