ArcObjects Library Reference  (NetworkAnalyst)    

NAContext CoClass

The analysis and problem definition container.

Product Availability

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

Interfaces

Interfaces Description
IConnectionPointContainer Supports connection points for connectable objects.
INAContext Provides access to the network analysis context.
INAContextEdit Provides access to the editable properties of a network analysis context.
IPersistStream (esriSystem)

Event Interfaces

Interfaces Description
INAContextEvents (default) Provides access to events triggered by the network analysis context.

Remarks

The NAContext is the center of the constellation of objects that are used during network analysis. 

The NAContext is initially created by calling CreateContext on the INASolver interface of a network solver object. It is then generally accessed by getting the Context property from the INALayer interface on the NALayer object. The INAContext interface can be used to obtain references to the NetworkDatasetNASolver, NAClasses, NATraversalResult, NALocator, and any extra objects that implement INAAgent. The INAContextEdit interface is used to set up some of the internal references to objects and to manage edit operations within the NAClasses.  The INAContextEvents interface is an outgoing interface that notifies clients when the NAContext is modified.

Working with Events

[Visual Basic 6.0]

When working with NAContext's default outbound interface in Visual Basic 6 declare variables as follows:

Private WithEvents pNAContext as NAContext