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


IEditTaskSearch Interface (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Editor)  

IEditTaskSearch Interface

Provides access to members that find edit tasks by name.

Product Availability

Available with ArcGIS Desktop.

Members

Description
Read-only property TaskByUniqueName An edit task by unique name.

CoClasses that implement IEditTaskSearch

CoClasses and Classes Description
Editor The Object Editor Extension.

Remarks

Use IEditTaskSearch::TaskByUniqueName to quickly find an edit task.  This is helpful because you don't need to loop over all the edit tasks and check their names to see if you are getting the task you want, and it is robust as it allows you to uniquely identify a task regardless of its name.

You can find edit tasks by this method only if the task implements IEditTaskName.

[C#]
/// 

/// This sample sets the editors task to Modify Feature///  
public void SetEditTaskToModifyFeature() 
{    
//get editor extension
UID editorUID=new UIDClass();
editorUID.Value="esriEditor.Editor";
IEditor editor=m_application.FindExtensionByCLSID(editorUID) as IEditor;

//use the unique task name to get the Modify Feature task
IEditTaskSearch editTaskSearch=editor as IEditTaskSearch;
  //set the task returned to the current edit task    
IEditTask editTask=editTaskSearch.get_TaskByUniqueName("GarciaUI_ModifyFeatureTask");
  if(editTask != null)    
{
editor.CurrentTask=editTask;
}
}

See Also

IEditTask Interface