Get the current network layer from the Network Analyst extension.
[C#]
///<summary>Get the current network layer from the Network Analyst extension.</summary> /// ///<param name="networkAnalystExtension">An INetworkAnalystExtension interface.</param> /// ///<returns>An INetworkLayer interface.</returns> /// ///<remarks></remarks> public ESRI.ArcGIS.Carto.INetworkLayer GetCurrentNetworkLayer(ESRI.ArcGIS.NetworkAnalystUI.INetworkAnalystExtension networkAnalystExtension) { ESRI.ArcGIS.Carto.INetworkLayer networkLayer = networkAnalystExtension.CurrentNetworkLayer; return networkLayer; }
[Visual Basic .NET]
'''<summary>Get the current network layer from the Network Analyst extension.</summary> ''' '''<param name="networkAnalystExtension">An INetworkAnalystExtension interface.</param> ''' '''<returns>An INetworkLayer interface.</returns> ''' '''<remarks></remarks> Public Function GetCurrentNetworkLayer(ByVal networkAnalystExtension As ESRI.ArcGIS.NetworkAnalystUI.INetworkAnalystExtension) As ESRI.ArcGIS.Carto.INetworkLayer Dim networkLayer As ESRI.ArcGIS.Carto.INetworkLayer = networkAnalystExtension.CurrentNetworkLayer Return networkLayer End Function