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


INAClassFieldMap Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > NetworkAnalyst > ESRI.ArcGIS.NetworkAnalyst > Interfaces > IN > INAClassFieldMap Interface
ArcGIS Developer Help

INAClassFieldMap Interface

Provides access to the the mapping of input fields to output fields.

Product Availability

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

Members

Name Description
Read-only property Count The count of field mappings defined.
Method CreateMapping Creates a new field name mapping.
Read/write property DefaultValue The default field value for a given input field name.
Read-only property FieldName The mapping for the given index.
Read/write property MappedField The output field name mapped to a given input field name.
Method Remove Removes the entry for an existing field name mapping.

Classes that implement INAClassFieldMap

Classes Description
NAClassFieldMap Defines one field mapping.

Remarks

The INAClassFieldMap interface provides access to a collection of field map items.  When used with NAClassLoader::Load, each field map item associates a field in the input row with a field in a NAClass.

The DefaultValue property is used when the input row has a null field value or no field mapping is specified.

[C#]

// Map the "Name" field of a Stops NAClass to the "Restaurant" field of an input feature class

ESRI.ArcGIS.NetworkAnalyst.INAClass stopsClass = naContext.NAClasses.get_ItemByName("Stops") as ESRI.ArcGIS.NetworkAnalyst.INAClass;

ESRI.ArcGIS.NetworkAnalyst.INAClassFieldMap naClassFieldMap = new ESRI.ArcGIS.NetworkAnalyst.NAClassFieldMapClass();

naClassFieldMap.CreateMapping(stopsClass.ClassDefinition, inputFeatureClass.Fields);

naClassFieldMap.set_MappedField("Name", "Restaurant");

[Visual Basic .NET]
' set up field map 
Dim stopsClass As INAClass =  naContext.NAClasses.ItemByName("Stops")
Dim naClassFieldMap As INAClassFieldMap =  New NAClassFieldMap() 
naClassFieldMap.CreateMapping(stopsClass.ClassDefinition, inputFeatureClass.Fields)
naClassFieldMap.MappedField("Name") = "Restaurant"

.NET Samples

Closest facility solver Location-allocation solver Origin-destination cost matrix solver Route layer Service area solver Vehicle routing problem solver