ListIndexes (arcpy)

Récapitulatif

Lists the indexes in a feature class, shapefile, or table in a specified dataset. The list returned can be limited with search criteria for index name and will contain index objects.

Syntaxe

ListIndexes (dataset, {wild_card})
ParamètreExplicationType de données
dataset

The specified feature class or table whose indexes will be returned.

String
wild_card

The wild_card limits the results returned. If no wild_card is specified, all values are returned.

String
Valeur renvoyée
Type de donnéesExplication
Index

A list containing Index objects is returned.

Exemple de code

ListIndexes example

List index properties.

import arcpy

featureclass = "c:/data/roads.shp"

# Get list of indexes for roads.shp and print properties
indexes = arcpy.ListIndexes(featureclass)
for index in indexes:
    print("Name        : {0}".format(index.name))
    print("IsAscending : {0}".format(index.isAscending))
    print("IsUnique    : {0}".format(index.isUnique))

Thèmes connexes

4/26/2014