This document is archived and information here might be outdated.  Recommended version.


ITopologyExtensionEvents Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > EditorExt > ESRI.ArcGIS.EditorExt > Interfaces > IT > ITopologyExtensionEvents Interface
ArcGIS Developer Help

ITopologyExtensionEvents Interface

Provides access to events that occur when working with a topology.

Product Availability

Available with ArcGIS Desktop.

Members

Name Description
Method OnActiveErrorsChanged Called when the active error selection is changed.
Method OnCurrentTopologyChanged Called when the current topology is changed.
Method OnErrorDeleted Called when a topology error is deleted.
Method OnTopologySelectionChanged Called when the topology element selection is changed.
Method OnValidate Called when a topology is validated.

Classes that implement ITopologyExtensionEvents

Classes Description
ErrorWindow Esri topology error inspector.
TopologyExtension Extension for working with topology.

Remarks

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.

 

[C#]

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.");
}

 

[Visual Basic .NET]

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