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


INALayer2 Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > NetworkAnalyst > ESRI.ArcGIS.NetworkAnalyst > Interfaces > IN > INALayer2 Interface
ArcGIS Developer Help

INALayer2 Interface

Provides access to the network analysis layer.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Network Analyst Extension.

Members

Name Description
Method Add Add a new layer.
Method AttachContext Sets the NALayer to reference the NAContext and the sublayers to reference the NAClasses of the NAContext.
Method Clear Clear all analysis layers.
Read/write property Context The network analysis context.
Method CopyContext Returns a copy of the NAContext referenced by the NALayer.
Read-only property DataLayerByNAClassName The network analysis layer or standalone table by class name.
Method Delete Delete an existing layer.
Read/write property Expanded Indicates if the network analysis layer is expanded or collapsed in the TOC of the map.
Read-only property LayerByNAClassName The network analysis layer by class name.

Inherited Interfaces

Interfaces Description
INALayer Provides access to the network analysis layer.

Classes that implement INALayer2

Classes Description
NALayer The layer for defining, solving, and viewing network analysis results.

Remarks

The INALayer2 interface is used to access the NAContext, access individual sublayers by specifying the name of the NAClass, manage the sublayers within the NALayer, as well as manage the state of an NALayer's context within the server environment.

CopyContext makes a copy of the NALayer's NAContext that can be persisted within a user's session state.  AttachContext re-attaches an NAContext to the NALayer.

CopyContext, AttachContext, and DataLayerByNAClassName should not be used from within ArcMap because user interface components listening to events on the NAContext will not have an opportunity to switch to the new NAContext.