Table properties
Resumen
The Describe function returns the following properties for tables. The Dataset property group is also supported. The Editor Tracking property group is supported if editor tracking has been enabled for this table.
Table properties are available in many types of Describe objects.
For a table, the Describe function's dataType property returns a value of "Table".
Propiedades
| Propiedad | Explicación | Tipo de datos |
|---|---|---|
|
controllerMemberships (Solo lectura) |
A list of |
Object |
|
dateAccessed (Solo lectura) |
The date in UTC that the table was last accessed in the map. For feature layers, this includes updating layer symbology. |
String |
|
dateCreated (Solo lectura) |
The date in UTC that the feature class was created. |
String |
|
dateModified (Solo lectura) |
The date in UTC that the feature class was last modified by a geoprocessing tool. |
String |
|
hasOID (Solo lectura) |
Specifies whether the table has an Object ID field. |
Boolean |
|
hasOID64 (Solo lectura) |
Specifies whether the table's Object ID field is 64-bit integer. This property is only supported when the |
Boolean |
|
OIDFieldName (Solo lectura) |
The name of the Object ID field if it exists. |
String |
|
fields (Solo lectura) |
A list of |
Field |
|
indexes (Solo lectura) |
A list of |
Index |
Muestra de código
Table properties example
The following stand-alone script displays the OID field name if the table has one. It then prints the name and type for each field in the table.
import arcpy
# Create a Describe object from the table.
desc = arcpy.Describe("C:/data/chesapeake.gdb/munich")
# If the table has an OID, print the OID field name
if desc.hasOID:
print("OIDFieldName: " + desc.OIDFieldName)
# Print the names and types of all the fields in the table
for field in desc.fields:
print("%-22s %s %s" % (field.name, ":", field.type))
#print field.name + " = " + field.type