Show Navigation | Hide Navigation
You are here:
Writing geoprocessing scripts > Scripting Object: Properties and methods > Properties and Methods

ListIndexes method

Release 9.1
Last modified August 19, 2005
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Properties and Methods"

Related Topics

List all the indexes in the specified table, feature class, or shapefile. Specifying search conditions (wildcard) will limit the results. This method and ListFields are the only two List methods that don't require the user to preset the workspace.


object.ListIndexes(pInputValue, [wild card]) as Object

Returns a Dispatch enumeration object that will, in turn, hand out Dispatch index objects.

Part Description
object The instantiated geoprocessing object
pInputValue The name, path, or both of the table, feature class, or shapefile whose indexes are to be listed
wild card Optional. Combination of * and characters that will help limit the results. The asterisk (*) is the same as saying ALL. If no wildcard is specified then all indexes in the workspace will be returned.

Index Object Properties

Name—returns the name

IsAscending—returns True if the index is sorted in ascending order

IsUnique—returns True if the field is unique

Fields—returns the fields object for this relationship class

Scripting example

from win32com.client import Dispatch
gp = Dispatch("esriGeoprocessing.GpDispatch.1")

fc = "c:\\county\\roads.shp"

indexes = gp.listindexes(fc)
index =
while index:
    print "Name: " + index.Name
    print "IsAscending: " + index.IsAscending
    print "IsUnique: " + index.IsUnique    
    index =

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.