This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > EditorExt > ESRI.ArcGIS.EditorExt > Interfaces > IT > ITopologyExtensionEvents Interface (ArcObjects .NET 10.5 SDK) |
Provides access to events that occur when working with a topology.
Description | ||
---|---|---|
OnActiveErrorsChanged | Called when the active error selection is changed. | |
OnCurrentTopologyChanged | Called when the current topology is changed. | |
OnErrorDeleted | Called when a topology error is deleted. | |
OnTopologySelectionChanged | Called when the topology element selection is changed. | |
OnValidate | Called when a topology is validated. |
CoClasses and Classes | Description |
---|---|
ErrorWindow | Esri topology error inspector. |
TopologyExtension | Extension for working with topology. |
TopologyExtension listeners are objects like a command that listen for and respond to events triggered by the topology extension. For example, the OnValidate event is fired each time a topology is validated and a custom object could perform additional tasks after receiving this notification.
The following code shows how to wire topology events in C#.
public void WireTopologyEvents()
{
UID extUid=new UIDClass();
extUid.Value="esriEditorExt.TopologyExtension";
//You can get app from ICommand :: OnCreate() hook parameter
ITopologyExtension topologyExt=app.FindExtensionByCLSID(extUid) as ITopologyExtension;
((ITopologyExtensionEvents_Event)topologyExt).OnTopologySelectionChanged +=
new ITopologyExtensionEvents_OnTopologySelectionChangedEventHandler(OnTopologySelectionChanged);
}
void OnTopologySelectionChanged()
{
System.Windows.Forms.MessageBox.Show("Topology selection changed.");
}
The following code shows how to wire topology events in VBNet.
Public Sub WireTopologyEvents()
'You can get app from ICommand :: OnCreate() hook parameter
Dim extUid As UID=New UIDClass()
extUid.Value="esriEditorExt.TopologyExtension"
Dim topologyExt As ITopologyExtension=TryCast(app.FindExtensionByCLSID(extUid), ITopologyExtension)
'Wire editor events.
AddHandler (CType(topologyExt, ITopologyExtensionEvents_Event).OnTopologySelectionChanged , AddressOf OnTopologySelectionChanged
End Sub
Private Sub OnTopologySelectionChanged()
System.Windows.Forms.MessageBox.Show("Topology selection changed.")
End Sub