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


INAContextEdit Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > ArcObjects namespaces > NetworkAnalyst > ESRI.ArcGIS.NetworkAnalyst > Interfaces > IN > INAContextEdit Interface (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (NetworkAnalyst)  

INAContextEdit Interface

Provides access to the editable properties of a network analysis context.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Network Analyst Extension.

Members

Name Description
Method AbortEditOperation Cancels an edit operation in progress.
Method Bind Prepare the context for analysis based upon the current network dataset schema.
Method ClearInputNAObjects Empty NAClasses that are defined as input or input/output.
Method ClearOutputNAObjects Empty NAClasses that are defined as output only.
Method ContextChanged Message all of the network analysis agents that the analysis context has changed.
Method CreateAnalysisClass Create a new analysis class based upon the given class definition.
Method HasRedos Indicates if any redo operations are available.
Method HasUndos Indicates if any undo operations are available.
Method Initialize Prepare the context for analysis.
Method IsBeingEdited Indicates if the class is currently being edited.
Write-only property Locator The locator used for finding network locations.
Method RedoEditOperation Repeats the last edit operation.
Write-only property Result The result of the analysis.
Method ResultChanged Message all of the network analysis agents that the analysis results have changed.
Write-only property Solver The function used for the analysis.
Method StartEditing Starts an edit session.
Method StartEditOperation Starts an edit operation.
Method StopEditing Stops an edit session.
Method StopEditOperation Stops an edit operation.
Method UndoEditOperation Cancels the last edit operation and returns to the state before it was started.

CoClasses that implement INAContextEdit

CoClasses and Classes Description
NAContext The analysis and problem definition container.

Remarks

The INAContextEdit interface is used to set up some of the internal references to objects and to manage edit operations within the NAClasses.

You must call Bind after calling CreateContext on NASolver.  Solvers must call Initialize when they create the NAContext.  If updating NALocationObjects outside of ArcMap, the methods to perform edits within an edit operation can be used.  However, if edits are being done within ArcMap, it is recommended that the edit operation methods on the NAWindow's INAWindow be used instead so ArcMap's undo/redo stack remains in sync.

The Result and Solver properties should only be set from within a custom solver. 

.NET Snippets

Create OD Cost Matrix Layer | Create Location Allocation Layer | Create Vehicle Routing Problem Layer | Create Service Area Layer | Create Route Layer

.NET Samples

Closest facility solver (Code Files: frmClosestFacilitySolver) | ArcGIS Network Analyst extension Engine application (Code Files: cmdLoadLocations frmMain) | Service area solver (Code Files: frmServiceAreaSolver) | Location-allocation solver (Code Files: frmLocationAllocationSolver) | Vehicle routing problem solver (Code Files: frmVRPSolver) | Origin-destination cost matrix solver (Code Files: frmODCostMatrixSolver) | Route layer (Code Files: Program)