This document is archived and information here might be outdated. Recommended version. |
Provides access to editor events. Implement it to listen for specific events that occur during an edit session.
Name | Description | |
---|---|---|
AfterDrawSketch | Called after the edit sketch is drawn. | |
OnChangeFeature | Called when features are modified. | |
OnConflictsDetected | Called when editing conflicts are detected during save. | |
OnCreateFeature | Called when new features are created. | |
OnCurrentLayerChanged | Called when the current layer changes. | |
OnCurrentTaskChanged | Called when the current task changes. | |
OnDeleteFeature | Called when features are deleted. | |
OnRedo | Called when RedoOperation is called. | |
OnSelectionChanged | Called when the selection changes. | |
OnSketchFinished | Called when the edit sketch is finished. | |
OnSketchModified | Called when the edit sketch is modified. | |
OnStartEditing | Called when editing begins. | |
OnStopEditing | Called when editing ends. | |
OnUndo | Called when UndoOperation is called. |
Classes | Description |
---|---|
Adjustment (esriEditorExt) | The Adjustment Tools Editor Extension. |
AnnotationEditExtension | An editor extension for creating and editing annotation features. |
CreateFeatureDockWin | Esri create features window. |
DimensionEditExtension | An editor extension for creating and editing dimension features. |
Editor | The Object Editor Extension. |
EditSelectionCache | Caches the selection for fast hit testing. |
FeatureSnap | Snap agent that snaps to a feature in a specified way. |
TableFrame (esriEditorExt) | Graphic Element to display table. |
TopologyExtension (esriEditorExt) | Extension for working with topology. |
UnplacedAnnotationWindow | Esri unplaced anno window. |
When editing geometric network features, different combinations of edit events may be fired depending on the edit that is being performed. For more infomation on geometric networks and network features refer to the IGeometricNetwork, INetworkFeature and IFeature interfaces. The following is a breakdown of when the OnCreateFeature, OnChangeFeature and OnDeleteFeature edit events are fired for specific geometric network editing scenarios. The events are listed in the order in which they are fired.
A standalone junction created:
A junction is created, snapped along a complex edge:
A junction is created, snapped along a simple edge:
A junction subsumes an orphan junction connected to an edge(s):
An edge is created:
An edge is created which with a connectivity rule (IConnectivityRule) that has a default junction specified:
A junction is moved (may or may not have connected edge(s)):
An endpoint orphan junction is deleted:
An endpoint junction is deleted:
A midspan orphan junction is deleted:
A midspan junction is deleted:
An edge is deleted:
public void WireEditEvents()
{
UID editorUid = new UIDClass();
editorUid.Value = "esriEditor.Editor";
//You can get app from ICommand :: OnCreate() hook
parameter
//declare the editor, and the editevents interface.
IEditor editor = app.FindExtensionByCLSID(editorUid) as IEditor;
//Wire edit events OnSketchFinished
((IEditEvents_Event)editor).OnSketchFinished +=
new IEditEvents_OnSketchFinishedEventHandler(OnSketchFinished);
}
void OnSketchFinished(IPolygon polygon)
{
System.Windows.Forms.MessageBox.Show("The Edit Sketch has been completed!");
}
For more information see How to listen to edit events. Public Sub WireEditEvents()
'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, IEditEvents_Event).OnSketchFinished), AddressOf OnSketchFinished
End Sub
Private Sub OnSketchFinished()
System.Windows.Forms.MessageBox.Show("The Edit Sketch has been completed!")
End Sub
IEditEvents2 Interface | IEditEvents Interface | IDatasetEdit Interface | IDatasetEditInfo Interface | IEditSketch Interface | IEditTask.Activate Method | IEditor Interface | IEditTask.Deactivate Method | ISnapEnvironment Interface | IEditEvents2 Interface | IEditLayers Interface | IEditEvents Interface | IEditTask.Name Property | Editor Class | Editor Library | IEditTask.OnFinishSketch Method | IEditAttributeProperties Interface | IEditTask.OnDeleteSketch Method | IEditProperties Interface