This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Editor > ESRI.ArcGIS.Editor > Classes > E > Editor Class (ArcObjects .NET 10.5 SDK) |
The Object Editor Extension.
Editor is a non-creatable object. References to non-creatable objects must be obtained through other objects.
Use the ISupportErrorInfo method InterfaceSupportsErrorInfo to determine if the object supports extended error information. If the object supports extended error info, VC++ developers should use the OLE/COM IErrorInfo interface to access the ErrorInfo object. Visual Basic developers should use the global error object Err to retrieve this extended error information.
Interfaces | Description |
---|---|
IActiveViewEvents (esriCarto) | Provides access to events that occur when the state of the active view changes. |
IAttributeTransferType | Provides access to members that control the behavior of the attribute transfer interfaces. |
IEditAnnotationProperties | Provides access to members that control the annotation properties of an edit session. |
IEditAttributeProperties | Provides access to members that control the short transaction attribute properties of an edit session. |
IEditLayers | Provides access to members that control information about layers in the edit session. |
IEditor | Provides access to members that control the behavior of the editor. |
IEditor2 | Provides access to methods that extend the IEditor interface. The additional members control the behavior of the auxiliary selection anchor. |
IEditor3 | Provides access to methods that extend the IEditor interface. The additional members control the behavior of the template construction and snapping. |
IEditorZ | Provides access to members that access and manipulate the z-environment of the editor. |
IEditProperties | Provides access to members that control the properties of an edit session. |
IEditProperties2 | Provides access to more members that control the properties of an edit session. |
IEditProperties3 | Provides access to more members that control the properties of an edit session. |
IEditProperties4 | Provides access to more members that control the properties of an edit session. |
IEditProperties5 | |
IEditSketch | Provides access to members that access and manipulate the edit sketch. |
IEditSketch2 | Provides access to members that access and manipulate the edit sketch. |
IEditSketch3 | Provides access to members that access and manipulate the edit sketch. |
IEditTaskSearch | Provides access to members that find edit tasks by name. |
IExtension (esriSystem) | Provides access to members that define an extension. |
IExtensionAccelerators (esriSystem) | Provides access to a method that creates extension accelerators. |
IExtensionManager (esriSystem) | Provides access to members that query extension. |
IPersist | Defines the single method GetClassID, which is designed to supply the CLSID of an object that can be stored persistently in the system. IPersist is the base interface for three other interfaces: IPersistStorage, IPersistStream, and IPersistFile. |
IPersistStream (esriSystem) | |
ISnapEnvironment | Provides access to members that manage the snap agents used by the editor. |
ISnapEnvironment2 | Provides access to members used to manipulate the snap environment for Zs. |
ISnapEnvironment3 | Provides access to members used to manipulate the snap environment for contraints. |
ISupportErrorInfo | Indicates whether a specific interface can return Automation error objects. |
Interfaces | Description |
---|---|
IEditEvents (default) | Provides access to editor events. Implement it to listen for specific events that occur during an edit session. |
IEditEvents2 | Provides access to more editor events. Implement it to listen for specific events that occur during an edit session. |
IEditEvents3 | Provides access to more editor events. Implement it to listen for specific events that occur during an edit session. |
IEditEvents4 | Provides access to more editor events. Implement it to listen for specific events that occur during an edit session. |
IEditEvents5 | Provides access to more editor events. Implement it to listen for specific events that occur during an edit session. |
private IEditor m_editor;
private IApplication m_application;
// Would get the app by using hook during implementation of CreateCommand
...
UID editorUid=new UID();
editorUid.Value="esriEditor.Editor";
if (app == null)
return;
m_editor=app.FindExtensionByCLSID(editorUid) as IEditor;
//To use the Editor name instead of UID
....
if (app == null)
return;
m_editor=app.FindExtensionByName("ESRI Object Editor") as IEditor;
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 editorUid As New UID
m_application=hook
editorUid.Value="esriEditor.Editor"
m_editor=m_application.FindExtensionByCLSID(editorUid)
End Sub
'Or it can be found by name.
...
...
m_editor=m_application.FindExtensionByName("ESRI Object Editor")
End Sub
When working with Editor's default outbound interface in Visual Basic 6 declare variables as follows:
Private WithEvents pEditor as Editor
When implementing IEditEvents2 declare variables as follows:
Private WithEvents pEditEvents2 as EditEvents2
When implementing IEditEvents3 declare variables as follows:
Private WithEvents pEditEvents3 as EditEvents3
When implementing IEditEvents4 declare variables as follows:
Private WithEvents pEditEvents4 as EditEvents4
When implementing IEditEvents5 declare variables as follows:
Private WithEvents pEditEvents5 as EditEvents5
IWorkspaceEdit Interface | IWorkspaceEditEvents Interface | ISpatialCacheManager Interface | IFeatureClass.CreateFeature Method | Editor Class