This document is archived and information here might be outdated. Recommended version. |
Gets the active analysis layer from the Network Analyst extension.
///<summary>Gets the active analysis layer from the Network Analyst extension.</summary> /// ///<param name="networkAnalystExtension">An INetworkAnalystExtension interface.</param> /// ///<returns>An INALayer3 interface.</returns> /// ///<remarks></remarks> public ESRI.ArcGIS.NetworkAnalyst.INALayer3 GetActiveAnalysisLayer(ESRI.ArcGIS.NetworkAnalystUI.INetworkAnalystExtension networkAnalystExtension) { ESRI.ArcGIS.NetworkAnalystUI.INAWindow naWindow=networkAnalystExtension.NAWindow; ESRI.ArcGIS.NetworkAnalyst.INALayer naLayer=naWindow.ActiveAnalysis; ESRI.ArcGIS.NetworkAnalyst.INALayer3 naLayer3=naLayer as ESRI.ArcGIS.NetworkAnalyst.INALayer3; // Dynamic Cast return naLayer3; }
'''<summary>Gets the active analysis layer from the Network Analyst extension.</summary> ''' '''<param name="networkAnalystExtension">An INetworkAnalystExtension interface.</param> ''' '''<returns>An INALayer3 interface.</returns> ''' '''<remarks></remarks> Public Function GetActiveAnalysisLayer(ByVal networkAnalystExtension As ESRI.ArcGIS.NetworkAnalystUI.INetworkAnalystExtension) As ESRI.ArcGIS.NetworkAnalyst.INALayer3 Dim naWindow As ESRI.ArcGIS.NetworkAnalystUI.INAWindow=networkAnalystExtension.NAWindow Dim naLayer As ESRI.ArcGIS.NetworkAnalyst.INALayer=naWindow.ActiveAnalysis Dim naLayer3 As ESRI.ArcGIS.NetworkAnalyst.INALayer3=TryCast(naLayer, ESRI.ArcGIS.NetworkAnalyst.INALayer3) ' Dynamic Cast Return naLayer3 End Function