This document is archived and information here might be outdated.  Recommended version.


IEditTask.Name Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Interfaces > IE > IEditTask Interface > IEditTask.Name Property
ArcGIS Developer Help

IEditTask.Name Property

The name of the edit task.

[Visual Basic .NET]
Public ReadOnly Property Name As String
[C#]
public string Name {get;}

Product Availability

Available with ArcGIS Desktop.

Remarks

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.

[C#]

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());
    }
  } 
     

See Also

IEditTask Interface | IEditTask Interface | IEditSketch Interface | IExtension Interface | esriSketchConstraint Constants | ISketchTool Interface | IEditTaskSearch Interface