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


Statements - Get Network Analyst Extension Snippet (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference

Statements - Get Network Analyst Extension Snippet

Get the Network Analyst extension from the application.

[C#]
//<-- Snippet Start -->
// DECSRIPTION:
// Get the Network Analyst extension from the application

ESRI.ArcGIS.NetworkAnalystUI.INetworkAnalystExtension naExtension=application.FindExtensionByName("Network Analyst") as ESRI.ArcGIS.NetworkAnalystUI.INetworkAnalystExtension;

//<-- Snippet End -->
[Visual Basic .NET]
' <-- Snippet Start -->
' DECSRIPTION:
' Get the Network Analyst extension from the application

Dim naExtension As ESRI.ArcGIS.NetworkAnalystUI.INetworkAnalystExtension=CType(application.FindExtensionByName("Network Analyst"), ESRI.ArcGIS.NetworkAnalystUI.INetworkAnalystExtension)

' <-- Snippet End -->

Additional Requirements
  • The code in this document requires the following References added to the Visual Studio project:
  • ESRI.ArcGIS.Framework
  • ESRI.ArcGIS.NetworkAnalystUI
  • ESRI.ArcGIS.System