laptop and a wrench

Bug

IIndex_Example available for C# at EDN, throws runtime exception.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM009385
SubmittedMay 30, 2007
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.2
Program languageC#
StatusNon-Reproducible

Additional Information

No Public Explanation

Workaround

public void IIndex_Example(IFeatureClass featureClass, string nameOfField){//get the field for which we will add the indexIFields fields = new FieldsClass();IFieldsEdit fieldsEdit = fields as IFieldsEdit;fieldsEdit.FieldCount_2 = 1;IField field = featureClass.Fields.get_Field(featureClass.Fields.FindField(nameOfField)); fieldsEdit.set_Field(0, field); //create new Index IIndex index = new IndexClass(); //cast for IindexEdit IIndexEdit indexEdit = (IIndexEdit)index; indexEdit.Fields_2 = fields; indexEdit.IsAscending_2 = false; indexEdit.IsUnique_2 = false; indexEdit.Name_2 = "Idx_1"; //add index to the feature class featureClass.AddIndex(index); }

Steps to Reproduce

Bug ID: NIM009385

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options