ArcGIS Developer Help  (NetworkAnalystUI)    

NetworkAnalystExtension CoClass

The extension for network analysis.

Product Availability

Requires Network Analyst Extension.

Description

The NetworkAnalystExtension is an ArcMap application extension that manages the current NetworkLayer and provides access to the NAWindow and the NALayers .

Interfaces

Interfaces Description
IActiveViewEvents (esriCarto) Provides access to events that occur when the state of the active view changes.
IConnectionPointContainer Supports connection points for connectable objects.
IDocumentEvents (esriArcMapUI) Provides access to events that occur in ArcMap.
IExtension (esriSystem) Provides access to members that define an extension.
IExtensionConfig (esriSystem) Provides access to members that describe an extension.
INetworkAnalystExtension Provides access to the network analyst extension.
IPersistStream (esriSystem)

Event Interfaces

Interfaces Description
INetworkAnalystExtensionEvents (default) Provides access to events triggered by the network analysis extension.

Remarks

There are methods to get

[Visual Basic 6.0]

This Visual Basic example shows three ways of how you can get the Network Analyst Extension from within ArcMap.

 

'Get Network Analyst Extension by name
Public Function GetNetworkAnalystExtensionByName() As INetworkAnalystExtension
  Set GetNetworkAnalystExtensionByName = Application.FindExtensionByName("Network Analyst")
End Function

'Get Network Analyst Extension by ProgID
Public Function GetNetworkAnalystExtensionByProgID() As INetworkAnalystExtension
  Dim pUID As New UID
  pUID.Value = "esriNetworkAnalystUI.NetworkAnalystExtension"
  Set GetNetworkAnalystExtensionByProgID = Application.FindExtensionByCLSID(pUID)
End Function

'Get Network Analyst Extension by CLSID
Public Function GetNetworkAnalystExtensionByCLSID() As INetworkAnalystExtension
  Dim pUID As New UID
  pUID.Value = "{C967BD39-1118-42EE-AAAB-B31642C89C3E}"
  Set GetNetworkAnalystExtensionByCLSID = Application.FindExtensionByCLSID(pUID)
End Function

Working with Events

[Visual Basic 6.0]

When working with NetworkAnalystExtension's default outbound interface in Visual Basic 6 declare variables as follows:

Private WithEvents pNetworkAnalystExtension as NetworkAnalystExtension

 


Feedback Send feedback on this page