The extension for network analysis.
The NetworkAnalystExtension is an ArcMap application extension that manages the current NetworkLayer and provides access to the NAWindow and the NALayers .
| 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) |
| Interfaces | Description |
|---|---|
| INetworkAnalystExtensionEvents (default) | Provides access to events triggered by the network analysis extension. |
There are methods to get
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
When working with NetworkAnalystExtension's default outbound interface in Visual Basic 6 declare variables as follows: Private WithEvents pNetworkAnalystExtension as NetworkAnalystExtension