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


Statements - Get Current Network Layer Snippet (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference

Statements - Get Current Network Layer Snippet

Get the current network layer from the Network Analyst extension.

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

ESRI.ArcGIS.Carto.INetworkLayer networkLayer=naExtension.CurrentNetworkLayer;

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

Dim networkLayer As ESRI.ArcGIS.Carto.INetworkLayer=naExtension.CurrentNetworkLayer

' <-- Snippet End -->

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