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


INetworkAnalystExtension.CurrentNetworkLayer Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > NetworkAnalystUI > ESRI.ArcGIS.NetworkAnalystUI > Interfaces > IN > INetworkAnalystExtension Interface > INetworkAnalystExtension.CurrentNetworkLayer Property
ArcGIS Developer Help

INetworkAnalystExtension.CurrentNetworkLayer Property

The current network layer.

[Visual Basic .NET]
Public Property CurrentNetworkLayer As INetworkLayer
[C#]
public INetworkLayer CurrentNetworkLayer {get; set;}

Product Availability

Available with ArcGIS Desktop. Requires Network Analyst Extension.

Remarks

The CurrentNetworkLayer property returns the currently selected NetworkLayer in the Network Dataset dropdown control on the Network Analyst Toolbar.

[C#]

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;
}
[Visual Basic .NET]

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

See Also

INetworkAnalystExtension Interface