This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > NetworkAnalystUI > ESRI.ArcGIS.NetworkAnalystUI > Interfaces > IN > INAWindow Interface > INAWindow.ActiveAnalysis Property (ArcObjects .NET 10.4 SDK) |
The current analysis shown in the window.
[Visual Basic .NET] Public Property ActiveAnalysis As INALayer
[C#] public INALayer ActiveAnalysis {get; set;}
ActiveAnalysis returns the active NALayer for the NAWindow. This is the network analysis layer that is shown as the selected layer in the Network Analyst Window's dropdown.
This C# example illustrates how you can get the active NALayer (as shown in the Network Analyst Window) programatically.
public INALayer GetActiveNetworkAnalysisLayer(IApplication app)
{
INetworkAnalystExtension networkAnalystExtension=app.FindExtensionByName("Network Analyst") as INetworkAnalystExtension;
return networkAnalystExtension.NAWindow.ActiveAnalysis;
}
This VB.NET example illustrates how you can get the active NALayer (as shown in the Network Analyst Window) programatically.
Public Function GetActiveNetworkAnalysisLayer(ByVal app As IApplication) As INALayer
Dim networkAnalystExtension As INetworkAnalystExtension=app.FindExtensionByName("Network Analyst")
Return networkAnalystExtension.NAWindow.ActiveAnalysis
End Function