ArcObjects Library Reference (NetworkAnalyst)  

INAContext Interface

Provides access to the network analysis context.

Product Availability

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

Members

Description
Read-only property Agents The collection of agents associated with the analysis.
Read-only property Locator The locator used for finding network locations for class items.
Read-only property NAClasses The collection of classes associated with the analysis.
Read-only property Name The name of the analysis.
Read-only property NetworkDataset The associated network dataset.
Read-only property NetworkDatasetName The associated network dataset name.
Read-only property Result The result for the analysis.
Read-only property Solver The function used for the analysis.
Read-only property SpatialReference The spatial reference of the analysis.

CoClasses that implement INAContext

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

Remarks

The INAContext interface can be used to obtain references to the constellation of objects used during network analysis.  This includes references to the NetworkDatasetNASolver, NAClasses, NATraversalResult, NALocator, and any extra objects that implement INAAgent

.NET Snippets

Clear NAClass | Create Vehicle Routing Problem Layer | Create Route Layer | Create Service Area Layer | Load Network Locations | Clear Active Analysis Layer | Create Closest Facility Layer | Create OD Cost Matrix Layer | Create Location Allocation Layer

.NET Samples

Export any network analysis class to a text file (Code Files: NAClassToTextfileCmd) | Closest facility solver (Code Files: frmClosestFacilitySolver) | ArcGIS Network Analyst extension Engine application (Code Files: frmLoadLocations frmNALayerProperties) | 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) | ArcGIS Network Analyst extension barrier location editor (Code Files: EditorForm) | Subset network evaluators (Code Files: AutoUpdateNetworkElementArrayParametersCommand SubsetHelperUI) | Route layer (Code Files: Program)

.NET Related Topics

How to generate directions | How to load data into a network analysis problem | How to set up an ArcGIS Network Analyst extension solve to work with the undo/redo stack