ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / FeatureDatasetToken Class
Members Example

In This Topic
    FeatureDatasetToken Class
    In This Topic
    The Token object to handle schema operations with a ArcGIS.Core.Data.Table.
    Syntax
    public class FeatureDatasetToken : Token 
    Public Class FeatureDatasetToken 
       Inherits Token
    Example
    Creating a FeatureDataset with a FeatureClass in one operation
    public void CreateFeatureDatasetWithFeatureClassSnippet(Geodatabase geodatabase)
    {
      // 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.FeatureDatasetToken

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also