ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data.DDL Namespace / SpatialIndexDescription Class / SpatialIndexDescription Constructor / SpatialIndexDescription Constructor(Index,FeatureClassDescription)
The spatial index the description object is representing
The description object representing the ArcGIS.Core.Data.FeatureClass that will hold the index.
Example Version

SpatialIndexDescription Constructor(Index,FeatureClassDescription)
Creates a description object of the spatial ArcGIS.Core.Data.Index. This method must be called on the MCT. Use QueuedTask.Run.
Syntax

Parameters

spatialIndex
The spatial index the description object is representing
featureClassDescription
The description object representing the ArcGIS.Core.Data.FeatureClass that will hold the index.
Exceptions
ExceptionDescription
Index contains a non-spatial field
spatialIndex cannot be null
featureClassDescription cannot be null
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
The spatialIndex parameter must contain a spatial field otherwise an System.ArgumentException will be thrown.
Example
Removing spatial index
public void RemoveSpatialIndex(SchemaBuilder schemaBuilder, FeatureClassDefinition featureClassDefinition)
{
    // Create a spatial description  
    SpatialIndexDescription spatialIndexDescription = new SpatialIndexDescription(new FeatureClassDescription(featureClassDefinition));

    // Enqueue the DDL operation to remove index 
    schemaBuilder.Delete(spatialIndexDescription);

    // Execute the delete index operation
    bool isDeleteIndexSuccess = schemaBuilder.Build();
}
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.4 or higher.
See Also