ArcObjects Library Reference (Editor)  

IEditor Interface

Provides access to members that control the behavior of the editor. Note: the IEditor interface has been superseded byIEditor3. Please consider using the more recent version.

Product Availability

Available with ArcGIS Desktop.

When To Use

The IEditor interface is the main interface used to control the actions of the editor. For example, use the members in this interface to start and stop an edit session, create and manage edit operations, and set the editor's current task.

Members

Description
Method AbortOperation Aborts an edit operation.
Method CreateSearchShape Creates a geometry using the point and the current search tolerance.
Read/write property CurrentTask The current edit task.
Method DelayEvents Used to batch operations together and minimize notifications.
Read-only property Display Reference to the current display.
Read-only property EditSelection The selected features which are editable.
Read-only property EditState The editor's current edit state.
Read-only property EditWorkspace Reference to the workspace being edited.
Method EnableUndoRedo Enable/disable the undo/redo capabilities.
Method FindExtension Finds the extension given an id.
Method HasEdits Indicates whether edits have been made during the session.
Method InvertAgent Draws the editor's snapping agent.
Read-only property Location The last known location of the mouse.
Read-only property Map Reference to the map being edited.
Read-only property Parent Reference to the parent application.
Method RedoOperation Redo an edit operation.
Read-only property ScratchWorkspace Reference to the editor's scratch workspace.
Method SearchSelection Searches the edit selection using the given location.
Read-only property SelectionAnchor The selection anchor point.
Read-only property SelectionCount The number of selected features which are editable.
Method StartEditing Starts an edit session.
Method StartOperation Starts an edit operation.
Method StopEditing Stops an edit session.
Method StopOperation Stops an edit operation.
Read-only property Task An edit task by index.
Read-only property TaskCount The number of edit tasks.
Method UndoOperation Undo an edit operation.

CoClasses that implement IEditor

CoClasses and Classes Description
Editor The Object Editor Extension.
[C#]
private IEditor m_editor;
private IApplication m_application;
// Would get the app by using hook during implementation of CreateCommand
      ...
      UID uID = new UID();
      uID.Value = "esriEditor.Editor";
      if (app == null)
        return;
      
      m_editor = app.FindExtensionByCLSID(uID) as IEditor;
//To use the Editor name instead of UID
     ....
       if (app == null)
        return;
       m_editor = app.FindExtensionByName("ESRI Object Editor") as IEditor;


[Visual Basic .NET]
In VB.Net you would get the reference to IApplication from hook in the ICommand::OnCreate() hook parameter
Private m_editor As IEditor
Private m_application As IApplication
...
Public Overrides Sub OnCreate(ByVal hook As Object)
    If Not (hook Is Nothing) Then
      If TypeOf (hook) Is IApplication Then
        m_application = CType(hook, IApplication)
      End If
    Else
      Exit Sub
    End If
    Dim uID As New UID
    m_application = hook
    uID.Value = "esriEditor.Editor"
    m_editor = m_application.FindExtensionByCLSID(uID)
  End Sub
Or it can be found by name. 
...
  ...
  m_editor = m_application.FindExtensionByName("ESRI Object Editor")
End Sub

See Also

IDatasetEdit Interface | IDatasetEditInfo Interface | IEditTask.Name Property | Editor Class | ISnapEnvironment Interface | IEditEvents2 Interface | IEditTask.Deactivate Method | IEditAttributeProperties Interface | IEditor Interface | IEditSketch Interface | IEditTask.OnFinishSketch Method | IEditProperties Interface | IEditLayers Interface | IEditTask.Activate Method | IEditTask.OnDeleteSketch Method | IEditEvents Interface | IApplication Interface | IMap Interface

.NET Snippets

Flip Line Direction

.NET Samples

Convert part to feature command (Code Files: ConvertPart) | Curve conversion add-in (Code Files: CurveConversionCmd CurveConversionDockWin) | Edit event listener (Code Files: EditorEventsDialog EventListener) | Angle Angle shape constructor (Code Files: AngleAngleCstr) | Tabbed feature inspector (Code Files: ObjectInspector) | Set flow by digitized direction (Code Files: SetFlowByDigitizedDirectionVBNet)

.NET Related Topics

Editor framework customizations | Managing edit sessions and edit operations | Responding to changes in the edit session | Updating geometry of existing features | Working with the ArcGIS snapping environment | Working with the edit sketch | Working with the editor snap environment