This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > NetworkAnalyst > ESRI.ArcGIS.NetworkAnalyst > Interfaces > IN > INAClassFieldMap Interface > INAClassFieldMap.CreateMapping Method (ArcObjects .NET 10.5 SDK) |
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
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.
INAClassFieldMap naClassFieldMap=new NAClassFieldMapClass();
naClassFieldMap.CreateMapping(inputNAClass.ClassDefinition, inputFeatureClass.Fields);
Dim naClassFieldMap as INAClassFieldMap=New NAClassFieldMap()
naClassFieldMap.CreateMapping(inputNAClass.ClassDefinition, inputFeatureClass.Fields)