ArcObjects Library Reference

Statements - Get Active Analysis Layer Snippet

Get the active analysis layer from the Network Analyst extension.

[C#]
                
//<-- Snippet Start -->
// DESCRIPTION:
// Get the active analysis layer from the Network Analyst extension

ESRI.ArcGIS.NetworkAnalyst.INALayer3 naLayer = naExtension.NAWindow.ActiveAnalysis as ESRI.ArcGIS.NetworkAnalyst.INALayer3;

//<-- Snippet End -->
[Visual Basic .NET]
                
' <-- Snippet Start -->
' DESCRIPTION:
' Get the active analysis layer from the Network Analyst extension

Dim naLayer As ESRI.ArcGIS.NetworkAnalyst.INALayer3 = CType(naExtension.NAWindow.ActiveAnalysis, ESRI.ArcGIS.NetworkAnalyst.INALayer3)

' <-- Snippet End -->


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