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


IEngineNAWindow Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IE > IEngineNAWindow Interface
ArcGIS Developer Help

IEngineNAWindow Interface

Provides access to the network analysis window. Note: the IEngineNAWindow interface has been superseded by IEngineNAWindow2. Please consider using the more recent version.

Product Availability

Available with ArcGIS Engine.

Description

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.

Members

Name Description
Method AbortOperation Cancels the operation in progress.
Read/write property ActiveAnalysis The current analysis shown in the window.
Read/write property ActiveCategory The current category shown in the window.
Read-only property CategoryByNAClassName The network analysis window by category.
Method DelayEvents Indicates if events should be delayed for a category.
Method DelayWindowUpdates Indicates if window updates should be delayed.
Read-only property hWnd The handle to the analysis window.
Read/write property ItemSelectionColor The color used for selected items.
Write-only property Message Displays a message at the bottom of the window.
Read-only property Selection The current selection in the window.
Method StartOperation Starts an analysis window operation.
Method StopOperation Stops an analysis window operation.
Method UpdateContent Refresh the window contents.

Classes that implement IEngineNAWindow

Classes Description
[C#]

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();
}

[Visual Basic .NET]

 Public Sub CopyBarriersFromFirstToSecondNALayer()
    'Get the map
    Dim map As IMap = AxMapControl1.Map

    'Get the engine network analyst environment 
    Dim engineNAEnvironment As IEngineNetworkAnalystEnvironment = New EngineNetworkAnalystEnvironmentClass
    'Get the engine NA window
    Dim naWindow As 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

.NET Samples

ArcGIS Network Analyst extension Engine application ArcGIS Network Analyst extension Engine application