This document is archived and information here might be outdated. Recommended version. |
Provides access to more editor events. Implement it to listen for specific events that occur during an edit session.
Name | Description | |
---|---|---|
BeforeDrawSketch | Called before the edit sketch is drawn. |
CoClasses and Classes | Description |
---|---|
EditEvents3 | Helper coclass for working with the nondefault outbound IEditEvents3 interface in VB. |
Editor | The Object Editor Extension. |
TopologyExtension (esriEditorExt) | Extension for working with topology. |
The following code shows how to wire edit events in C#.
public void WireEditEvents3()
{
UID editorUid=new UIDClass();
editorUid.Value="esriEditor.Editor";
//You can get app from ICommand :: OnCreate() hook parameter
IEditor editor=app.FindExtensionByCLSID(editorUid) as IEditor;
((IEditEvents3_Event)editor).BeforeDrawSketch += new IEditEvents3_BeforeDrawSketchEventHandler(BeforeDrawSketch);
}
void BeforeDrawSketch(IDisplay disp)
{
//To do:
}
For more information see How to listen to edit events. The following code shows how to wire edit events in VBNet.
Public Sub WireEditEvents3()
'You can get app from ICommand :: OnCreate() hook parameter
Dim editorUid As UID=New UIDClass()
editorUid.Value="esriEditor.Editor"
Dim editor As IEditor=TryCast(app.FindExtensionByCLSID(editorUid), IEditor)
'Wire editor events.
AddHandler (CType(editor, IEditEvents3_Event).BeforeDrawSketch), AddressOf BeforeDrawSketch
End Sub
Private Sub BeforeDrawSketch(ByVal disp As ESRI.ArcGIS.Display.IDisplay)
'To do
End Sub