This sample shows how to use the DDL APIs to generate and delete Spatial Indexes and Attribute Indexes.
Language: C#
Subject: Framework
Contributor: ArcGIS Pro SDK Team <arcgisprosdk@esri.com>
Organization: Esri, https://www.esri.com
Date: 04/04/2024
ArcGIS Pro: 3.3
Visual Studio: 2022
.NET Target Framework: net8.0-windows
- Sample data for ArcGIS Pro SDK Community Samples can be downloaded from the Releases page.
Using the sample:
- Open this solution in Visual Studio.
- Click the build menu and select Build Solution.
- Click the Start button to open ArCGIS Pro. ArcGIS Pro will open.
- Open any project.
- Click on the Add-in tab and verify that a "Feature Indexing" group was added.
- Notice the buttons in the FeatureIndexing group.
- Tap the "Create Feature With Index" button.
- Add the new Database into the Catalog pane.
- Expand the newly added database.
- Right click on the "Buildings" Feature class.
- Open the table
- Notice the "*" denotes indexing which can be seen on the name and address name fields.
- Tap the "Add Indexs To An Existing Data Set" button.
- Refresh the database
- Right click on the "Building" Feature class.
- Open the table.
- Notice the "*" can be seen on buildingUsage and buildingColor name fields.
![UI] (Screenshots/Screen5.png) - Notice when hovering over a field name it displays information regarding whether or not a field is indexed.
- In order to delete the SpatialIndex Tap the "Remove Spatial Index" button.
- This will delete the indexing on the Shape field.
- In order to delete the Attribute index Tap the "Remove Attribute Index" button.
- Notice the attribute "name" and "address" are no longer indexed.
Home | API Reference | Requirements | Download | Samples