ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / FeatureClassToken Class
Members Example

In This Topic
    FeatureClassToken Class
    In This Topic
    The Token object to handle schema operations with a ArcGIS.Core.Data.FeatureClass.
    Syntax
    public class FeatureClassToken : TableToken 
    Public Class FeatureClassToken 
       Inherits TableToken
    Example
    Creating a FeatureDataset with a FeatureClass in one operation
    // Creating a FeatureDataset named as 'Parcel_Information' and a FeatureClass with name 'Parcels' in one operation
    
    string featureDatasetName = "Parcel_Information";
    string featureClassName = "Parcels";
    
    SchemaBuilder schemaBuilder = new SchemaBuilder(geodatabase);
    
    // Create a FeatureDataset token
    FeatureDatasetDescription featureDatasetDescription = new FeatureDatasetDescription(featureDatasetName, SpatialReferences.WGS84);
    FeatureDatasetToken featureDatasetToken = schemaBuilder.Create(featureDatasetDescription);
    
    // Create a FeatureClass description
    FeatureClassDescription featureClassDescription = new FeatureClassDescription(featureClassName,
      new List<FieldDescription>()
      {
        new FieldDescription("Id", FieldType.Integer),
        new FieldDescription("Address", FieldType.String)
      },
      new ShapeDescription(GeometryType.Point, SpatialReferences.WGS84));
    
    // Create a FeatureClass inside a FeatureDataset
    FeatureClassToken featureClassToken = schemaBuilder.Create(new FeatureDatasetDescription(featureDatasetToken), featureClassDescription);
    
    // Build status
    bool buildStatus = schemaBuilder.Build();
    
    // Build errors
    if (!buildStatus)
    {
      IReadOnlyList<string> errors = schemaBuilder.ErrorMessages;
    }
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.Data.DDL.Token
          ArcGIS.Core.Data.DDL.TableToken
             ArcGIS.Core.Data.DDL.FeatureClassToken
                ArcGIS.Core.Data.DDL.AnnotationFeatureClassToken

    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also