Provides access to the the mapping of input fields to output fields.
Product Availability
Members
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. |
CoClasses that implement INAClassFieldMap
CoClasses and 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.
// 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"