CAD 工程图数据集属性

摘要

Describe 函数可返回 CAD 工程图数据集的以下属性。同时还支持数据集属性

CAD 工程图数据集可返回“CadDrawingDataset”dataType

属性

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

Indicates whether a CAD dataset is 2D

Boolean
is3D
(只读)

Indicates whether a CAD dataset is 3D

Boolean
isAutoCAD
(只读)

Indicates whether a CAD dataset is an AutoCAD file

Boolean
isDGN
(只读)

Indicates whether a CAD dataset is a MicroStation file

Boolean

代码示例

CAD Drawing Dataset properties example (stand-alone script)

The following stand-alone script displays properties for a CAD Drawing Dataset.

import arcpy 

# Create a describe object 
# 
desc = arcpy.Describe("C:/data/arch.dgn")

# Print Cad Drawing Dataset properties 
# 
print "%-12s %s" % ("is2D:", desc.is2D)
print "%-12s %s" % ("is3D:", desc.is3D)
print "%-12s %s" % ("isAutoCAD:", desc.isAutoCAD)
print "%-12s %s" % ("isDGN:", desc.isDGN)


7/10/2012