ListIndexes

概要

Returns a list of the indexes in a feature class, shapefile, or table in a specified dataset.

構文

ListIndexes (dataset, {wild_card})
パラメーター説明データ タイプ
dataset

The specified feature class or table with the indexes to be returned.

String
wild_card

Limits the results returned. If a value is not specified, all values are returned. The wildcard is not case sensitive.

SymbolDescriptionExample

*

Represents zero or more characters.

Te* finds Tennessee and Texas.

String
戻り値
データ タイプ説明
Index

A list containing Index objects is returned.

コードのサンプル

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))

関連トピック