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


INetworkAnalysisExt.AddLayer Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > EditorExt > ESRI.ArcGIS.EditorExt > Interfaces > IN > INetworkAnalysisExt Interface > INetworkAnalysisExt.AddLayer Method
ArcGIS Developer Help

INetworkAnalysisExt.AddLayer Method

Adds a layer to the Network Analysis extension.

[Visual Basic .NET]
Public Sub AddLayer ( _
    ByVal Layer As ILayer _
)
[C#]
public void AddLayer (
    ILayer Layer
);

Product Availability

Available with ArcGIS Desktop.

Remarks

The Network Analysis Extension manages the feature layers for the current network. Only those feature layers added to the Extension are considered when the user interacts with the map, such as adding flags and barriers using the Flag and Barrier tools, displaying the flow arrows, and drawing the results of a trace task.
The AddLayer method adds a reference to a feature layer to the Network Analysis Extension. If the geometric network to which the feature layer's feature class belongs is not loaded into the Extension, then the geometric network is added into the Extension.
Feature layers are added to the Extension using the AddLayer method, and removed using the DropLayer method. The AddNetwork method does not explicitly add layers to the Extension.
In general, it is not necessary to manually add and drop layers from the Network Analysis Extension, as the Extension automatically performs this when a feature layer from the current network is added or deleted from the focus map of the document.

See Also

INetworkAnalysisExt Interface | ILayer Interface