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


INAClassFieldMap.CreateMapping Method (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 > INAClassFieldMap.CreateMapping Method
ArcGIS Developer Help

INAClassFieldMap.CreateMapping Method

Creates a new field name mapping.

[Visual Basic .NET]
Public Sub CreateMapping ( _
    ByVal classDef As INAClassDefinition, _
    ByVal Fields As IFields _
)
[C#]
public void CreateMapping (
    INAClassDefinition classDef,
    IFields Fields
);
[C++]
HRESULT CreateMapping(
  INAClassDefinition* classDef,
  IFields* Fields
);
[C++]
Parameters
classDef [in]

classDef is a parameter of type INAClassDefinition* Fields [in]
Fields is a parameter of type IFields*

Product Availability

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

Remarks

CreateMapping generates the default mapping for fields based on the inbound INAClassDefinition parameter.  The default mapping is based on matching the INAClassDefinition::CandidateFieldNames of the input INAClassDefinition to the field names in the input IFields parameter. Each matched field will be stored in the NAClassFieldMap object and is accessible via the MappedField method.

[C#]
INAClassFieldMap naClassFieldMap = new NAClassFieldMapClass();
naClassFieldMap.CreateMapping(inputNAClass.ClassDefinition, inputFeatureClass.Fields);
[Visual Basic .NET]
Dim naClassFieldMap as INAClassFieldMap = New NAClassFieldMap()
naClassFieldMap.CreateMapping(inputNAClass.ClassDefinition, inputFeatureClass.Fields)

See Also

INAClassFieldMap Interface

.NET Samples

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