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


INAWindow.ActiveAnalysis Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (NetworkAnalystUI)  

INAWindow.ActiveAnalysis Property

The current analysis shown in the window.

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

Product Availability

Available with ArcGIS Desktop. Requires Network Analyst Extension.

Remarks

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.

[C#]

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

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

See Also

INAWindow Interface

.NET Snippets

Get Active Analysis Layer | Statements - Get Active Analysis Layer | Clear NAClass | Clear Active Analysis Layer

.NET Samples

Subset network evaluators (Code Files: AutoUpdateNetworkElementArrayParametersCommand SubsetHelperUI)