This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > NetworkAnalystUI > ESRI.ArcGIS.NetworkAnalystUI > Interfaces > IN > INetworkAnalystExtension Interface > INetworkAnalystExtension.CurrentNetworkLayer Property (ArcObjects .NET 10.4 SDK) |
The current network layer.
[Visual Basic .NET] Public Property CurrentNetworkLayer As INetworkLayer
[C#] public INetworkLayer CurrentNetworkLayer {get; set;}
The CurrentNetworkLayer property returns the currently selected NetworkLayer in the Network Dataset dropdown control on the Network Analyst Toolbar.
This code shows how to get the current network dataset layer from the Network Analyst extension.
public INetworkLayer GetCurrentNetworkLayer(IApplication app)
{
INetworkAnalystExtension networkAnalystExtension=app.FindExtensionByName("Network Analyst") as INetworkAnalystExtension;
return networkAnalystExtension.CurrentNetworkLayer;
}
This code shows how to get the current network dataset layer from the Network Analyst extension.
Public Function GetCurrentNetworkLayer(ByVal app As IApplication) As INetworkLayer
Dim networkAnalystExtension As INetworkAnalystExtension= app.FindExtensionByName("Network Analyst")
Return networkAnalystExtension.CurrentNetworkLayer
End Function