This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > NetworkAnalystUI > ESRI.ArcGIS.NetworkAnalystUI > Interfaces > IN > INetworkAnalystExtension Interface > INetworkAnalystExtension.NetworkLayer Property (ArcObjects .NET 10.4 SDK) |
The network layer by index.
[Visual Basic .NET] Public Function get_NetworkLayer ( _ ByVal index As Integer _ ) As INetworkLayer
[C#] public INetworkLayer get_NetworkLayer ( int index );
The NetworkLayer property returns the NetworkLayer referencing a NetworkDataset at the specified index in the range 0 to NetworkLayerCount - 1.
This code shows how to get a network dataset layer by index (zero based) from the Network Analyst extension.
public INetworkLayer GetNetworkLayer(IApplication app, int index)
{
INetworkAnalystExtension networkAnalystExtension=app.FindExtensionByName("Network Analyst") as INetworkAnalystExtension;
return networkAnalystExtension.get_NetworkLayer(index);
}
This code shows how to get a network dataset layer by index (zero based) from the Network Analyst extension.
Public Function GetNetworkLayer(ByVal app As IApplication, ByVal index As Integer) As INetworkLayer
Dim networkAnalystExtension As INetworkAnalystExtension= app.FindExtensionByName("Network Analyst")
Return networkAnalystExtension.NetworkLayer(index)
End Function