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


NATraversalResult Class (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > NetworkAnalyst > ESRI.ArcGIS.NetworkAnalyst > Classes > N > NATraversalResult Class
ArcGIS Developer Help

NATraversalResultClass Class

Contains the result of a network analysis.

Product Availability

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

Interfaces

Interfaces Description
INAResult Provides access to the results of an analysis.
INAResult2 Provides access to the results of an analysis.
INATraversalResult Provides access to the properties of a traversal result.
INATraversalResultEdit Provides access to the editable properties of a traversal result.
INATraversalResultEdit2 Provides access to the editable properties of a traversal result.
INATraversalResultQuery Provides access to the results of an analysis.
INATraversalResultQuery2 Provides access to the results of an analysis.
IPersistStream (esriSystem)

Remarks

The NATraversalResult object holds the results of the network analysis. It can be retrieved from the NAContext using the INAContext::Result property.

The NATraversalResult is created by most of the solvers as part of the output for network analysis.  However, this is not the case for the ODCostMatrixSolver or VRPSolver, which do not output an NATraversalResult.

The contents of an NATraversalResult are not saved with the NALayer.  If a map document holding an NALayer is opened, things that need the NATraversalResult contents to work (like the NAStreetDirectionsAgent) will fail until the analysis is re-solved and a traversal result is populated.

The NATraversalResult holds 3 feature classes representing the traversed junctions, edges, and turns.  Methods on this object can query these feature classes and map features back to source features in the network dataset.

There is a level of indirection in the NATraversalResult.  Each element in the NATraversalResult represents a network feature in the source network that was traversed or a feature in an NAClass (stop), or it can be unrelated to any external feature (where multiple stops are located at the same place and the edges between the stops are virtual).  Due to this, you need to use the methods in INATraversalResult to determine the mapping between the traversal source and its feature class in the NetworkDataset or NAContext.  There are several methods that return an NATraversalResultSource object with this information.