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


INAClassLoader Interface (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (NetworkAnalyst)  

INAClassLoader Interface

Provides access to populate network analysis classes in preparation for analysis. Note: the INAClassLoader interface has been superseded byINAClassLoader2. Please consider using the more recent version.

Product Availability

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

Members

Description
Read/write property FieldMap The field mapping definition.
Method Load Populate the network analysis class.
Read/write property Locator The locator to be used.
Read/write property NAClass The network analysis class.

CoClasses that implement INAClassLoader

CoClasses and Classes Description
NAClassLoader Loads a network class based on its field maps.

Remarks

INAClassLoader has been superseded by INAClassLoader2.

[C#]
// Load Stops
INAClassFieldMap naClassFieldMap=new NAClassFieldMapClass();
naClassFieldMap.CreateMapping(stopsNAClass.ClassDefinition, inputStopsFClass.Fields);
if (workspace.Type == esriFileSystemWorkspace)
    naClassFieldMap.set_MappedField("Name", SHAPE_INPUT_NAME_FIELD);
else
    naClassFieldMap.set_MappedField("Name", INPUT_NAME_FIELD);
INAClassLoader naLoader=new NAClassLoaderClass();
naLoader.Locator=naContext.Locator;
naLoader.NAClass=stopsNAClass;
naLoader.FieldMap=naClassFieldMap;
  
int rowsIn=0;
int rowsLocated=0;
naLoader.Load((ICursor)inputStopsFClass.Search(null, true), new CancelTrackerClass(), ref rowsIn, ref rowsLocated);
[Visual Basic .NET]
' Load Stops
Dim naClassFieldMap As INAClassFieldMap=New NAClassFieldMap() 
naClassFieldMap.CreateMapping(stopsNAClass.ClassDefinition, inputStopsFClass.Fields)
If workspace.Type=esriFileSystemWorkspace Then
    naClassFieldMap.MappedField("Name")=SHAPE_INPUT_NAME_FIELD
Else
    naClassFieldMap.MappedField("Name")=INPUT_NAME_FIELD
End If
 
Dim naLoader As INAClassLoader=New NAClassLoader() 
naLoader.Locator=naContext.Locator
naLoader.NAClass=stopsNAClass
naLoader.FieldMap=naClassFieldMap
 
Dim rowsIn As Integer= 0 
Dim rowsLocated As Integer= 0 
naLoader.Load(inputStopsFClass.Search(Nothing, True), New CancelTracker(),  rowsIn,  rowsLocated)

.NET Samples

Closest facility solver (Code Files: frmClosestFacilitySolver) | 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)