Get the NAWindow2 from the Network Analyst extension.
[C#]
///<summary>Get the NAWindow2 from the Network Analyst extension.</summary> /// ///<param name="networkAnalystExtension">An INetworkAnalystExtension interface.</param> /// ///<returns>An INAWindow2 interface.</returns> /// ///<remarks></remarks> public ESRI.ArcGIS.NetworkAnalystUI.INAWindow2 GetNAWindow2(ESRI.ArcGIS.NetworkAnalystUI.INetworkAnalystExtension networkAnalystExtension) { ESRI.ArcGIS.NetworkAnalystUI.INAWindow naWindow = networkAnalystExtension.NAWindow; ESRI.ArcGIS.NetworkAnalystUI.INAWindow2 naWindow2 = naWindow as ESRI.ArcGIS.NetworkAnalystUI.INAWindow2; // Dynamic Cast return naWindow2; }
[Visual Basic .NET]
'''<summary>Get the NAWindow2 from the Network Analyst extension.</summary> ''' '''<param name="networkAnalystExtension">An INetworkAnalystExtension interface.</param> ''' '''<returns>An INAWindow2 interface.</returns> ''' '''<remarks></remarks> Public Function GetNAWindow2(ByVal networkAnalystExtension As ESRI.ArcGIS.NetworkAnalystUI.INetworkAnalystExtension) As ESRI.ArcGIS.NetworkAnalystUI.INAWindow2 Dim naWindow As ESRI.ArcGIS.NetworkAnalystUI.INAWindow = networkAnalystExtension.NAWindow Dim naWindow2 As ESRI.ArcGIS.NetworkAnalystUI.INAWindow2 = TryCast(naWindow, ESRI.ArcGIS.NetworkAnalystUI.INAWindow2) ' Dynamic Cast Return naWindow2 End Function