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.
IEditEvents2 contains a collection of new editor events added at release 8.1. For example, the editor now fires event notifcations whenever an edit sketch vertex is added, deleted, or moved.
For more information on editor events, see IEditEvents.
Name | Description | |
---|---|---|
BeforeStopEditing | Fired before StopEditing happens. | |
BeforeStopOperation | Called before StopOperation is called. | |
OnAbort | Called when AbortOperation is called. | |
OnCurrentZChanged | Called when the CurrentZ changes. | |
OnSaveEdits | Called when edits are saved. | |
OnStartOperation | Called when StartOperation is called. | |
OnStopOperation | Called when StopOperation is called. | |
OnVertexAdded | Called after a point/vertex is added to the sketch. | |
OnVertexDeleted | Called after a point is deleted from the sketch. | |
OnVertexMoved | Called after a vertex/point has been moved in the sketch. |
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. |
EditEvents2 | Helper coclass for working with the nondefault outbound IEditEvents2 interface in VB. |
Editor | The Object Editor Extension. |
TableFrame (esriEditorExt) | Graphic Element to display table. |
TopologyExtension (esriEditorExt) | Extension for working with topology. |
UnplacedAnnotationWindow | Esri unplaced anno window. |
As with IEditEvents, always set the event object variable to nothing when the class is destructed to avoid circular reference problems.
When editing geometric network features, different combinations of edit events may be fired depending on the edit that is being performed. The OnVertexAdded event is the fired before the OnCreateFeature, OnChangeFeature and OnDeleteFeature edit events under the following geometric network editing scenarios:
See the IEditEvents interface for a listing of those events that are fired when geometric network features are edited. For more infomation on geometric networks and network features refer to the IGeometricNetwork, INetworkFeature and IFeature interfaces.
The following code shows how to wire edit events in C#.
public void WireEditEvents2()
{
UID editorUid = new UIDClass();
editorUid.Value = "esriEditor.Editor";
//You can get app from ICommand :: OnCreate() hook parameter
IEditor editor = app.FindExtensionByCLSID(editorUid) as IEditor;
((IEditEvents2_Event)editor).OnVertexAdded +=
new IEditEvents2_OnVertexAddedEventHandler(OnVertexAdded);
}
void OnVertexAdded(IPoint point)
{
System.Windows.Forms.MessageBox.Show("Vertex Added.");
}
For more information see How to listen to edit events. 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