This document is archived and information here might be outdated. Recommended version. |
Provides access to the the mapping of input fields to output fields.
Name | Description | |
---|---|---|
Count | The count of field mappings defined. | |
CreateMapping | Creates a new field name mapping. | |
DefaultValue | The default field value for a given input field name. | |
FieldName | The mapping for the given index. | |
MappedField | The output field name mapped to a given input field name. | |
Remove | Removes the entry for an existing field name mapping. |
Classes | Description |
---|---|
NAClassFieldMap | Defines one field mapping. |
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.
// 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");
' 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"