This document is archived and information here might be outdated. Recommended version. |
The current category shown in the window.
[Visual Basic .NET] Public Property ActiveCategory As INAWindowCategory
[C#] public INAWindowCategory ActiveCategory {get; set;}
The ActiveCategory is the current category of network locations selected in the NAWindow. Examples of categories include Stops, Barriers, Incidents, Facilities, Routes, etc.
The INAWindowCategory returned by ActiveCategory has methods to get the NALayer's sublayer or the NAClass.
public void ShowActiveCategory(IApplication app)
{
INetworkAnalystExtension networkAnalystExtension=app.FindExtensionByName("Network Analyst") as INetworkAnalystExtension;
INAWindow naWindow=networkAnalystExtension.NAWindow;
INAWindowCategory naWindowCategory=naWindow.ActiveCategory;
MessageBox.Show(string.Format("ActiveCategory Layer Name: {0}", naWindowCategory.Layer.Name));
MessageBox.Show(string.Format("ActiveCategory NAClass Name: {0}", naWindowCategory.NAClass.ClassDefinition.Name));
}
Public Sub ShowActiveCategory(ByVal app As IApplication)
Dim networkAnalystExtension As INetworkAnalystExtension=app.FindExtensionByName("Network Analyst")
Dim naWindow As INAWindow=networkAnalystExtension.NAWindow
Dim naWindowCategory As INAWindowCategory=naWindow.ActiveCategory
MessageBox.Show(String.Format("ActiveCategory Layer Name: {0}", naWindowCategory.Layer.Name))
MessageBox.Show(String.Format("ActiveCategory NAClass Name: {0}", naWindowCategory.NAClass.ClassDefinition.Name))
End Sub