This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IE > IEngineNAWindow Interface (ArcObjects .NET 10.5 SDK) |
Provides access to the network analysis window. Note: the IEngineNAWindow interface has been superseded byIEngineNAWindow2. Please consider using the more recent version.
The IEngineNAWindow interface is the main interface on the IEngineNetworkAnalystEnvironment::NAWindow. It provides methods to access the NALayer and to edit INAContext::NAClasses within the context of an undo/redo operation.
Description | ||
---|---|---|
AbortOperation | Cancels the operation in progress. | |
ActiveAnalysis | The current analysis shown in the window. | |
ActiveCategory | The current category shown in the window. | |
CategoryByNAClassName | The network analysis window by category. | |
DelayEvents | Indicates if events should be delayed for a category. | |
DelayWindowUpdates | Indicates if window updates should be delayed. | |
hWnd | The handle to the analysis window. | |
ItemSelectionColor | The color used for selected items. | |
Message | Displays a message at the bottom of the window. | |
Selection | The current selection in the window. | |
StartOperation | Starts an analysis window operation. | |
StopOperation | Stops an analysis window operation. | |
UpdateContent | Refresh the window contents. |
private void
CopyBarriersFromFirstToSecondNALayer() {//Get the map
IMap map=axMapControl1.Map;//Get the engine network analyst environment
IEngineNetworkAnalystEnvironment engineNAEnvironment=new
EngineNetworkAnalystEnvironmentClass();//Get the engine NA window
IEngineNAWindow naWindow=engineNAEnvironment.NAWindow;//Copy the barriers from the first layer
naWindow.ActiveAnalysis=(INALayer) map.get_Layer(0); naWindow.ActiveCategory=naWindow.get_CategoryByNAClassName("Barriers"); naWindow.Selection.Copy();//Paste the barriers in the second layer
naWindow.ActiveAnalysis=(INALayer) map.get_Layer(1); naWindow.ActiveCategory=naWindow.get_CategoryByNAClassName("Barriers"); naWindow.Selection.Paste(); }
Public Sub
CopyBarriersFromFirstToSecondNALayer()'Get the map
Dim
mapAs
IMap=AxMapControl1.Map'Get the engine network analyst environment
Dim
engineNAEnvironmentAs
IEngineNetworkAnalystEnvironment=New
EngineNetworkAnalystEnvironmentClass'Get the engine NA window
Dim
naWindowAs
IEngineNAWindow=engineNAEnvironment.NAWindow'Copy the barriers from the first layer
naWindow.ActiveAnalysis=map.Layer(0) naWindow.ActiveCategory=naWindow.CategoryByNAClassName("Barriers") naWindow.Selection.Copy()'Paste the barriers in the second layer
naWindow.ActiveAnalysis=map.Layer(1) naWindow.ActiveCategory=naWindow.CategoryByNAClassName("Barriers") naWindow.Selection.Paste()End Sub