制图表达类属性 (arcpy)

摘要

Describe 函数可返回制图表达类的以下属性。同时还支持数据集属性

可从 GDB 要素类的 GDBFeatureClass.representations 属性或 DescribeObject.children 属性获得制图表达类的 Describe 属性。

制图表达类可返回“RepresentationClass”dataType

属性

属性说明数据类型
overrideFieldName
(只读)

The name of the Override field.

String
requireShapeOverride
(只读)

Indicates if a shape override is required for feature representations.

Boolean
ruleIDFieldName
(只读)

The name of the RuleID field.

String

代码实例

RepresentationClass properties example (stand-alone script)

The following stand-alone script displays properties for all the representation classes in a feature class.

import arcpy

# Create a Describe object
#
desc = arcpy.Describe("C:/data/moad.gdb/Water_Bodies")

# Print RepresentationClass properties for each representation 
#   in the feature class.
#
for child in desc.representations:
    if child.datasetType == "RepresentationClass":
        print child.name
        print "\t%-25s %s" % ("Override field name:", child.overrideFieldName)
        print "\t%-25s %s" % ("Shape override required:", child.requireShapeOverride)
        print "\t%-25s %s" % ("RuleID field name:", child.ruleIDFieldName)
9/15/2013