获取外部引用的块属性值
Contents
[
Hide
]获取块属性值
Aspose.CAD for Python API 允许您获取块属性的外部引用。Aspose.CAD API 暴露了 XRefPathName 属性,以获取 CadBlockDictionary 集合中块属性的外部引用。以下是获取块属性外部引用的代码演示。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import aspose.cad as cad | |
from aspose.pycore import cast | |
if __name__ == '__main__': | |
image = cad.fileformats.cad.CadImage.load(file) | |
castedImage = cast(cad.fileformats.cad.CadImage, image) | |
for entity in castedImage.block_entities.values: | |
if entity.original_block_name == '*Model_Space': | |
print(entity.x_ref_path_name) |