Get Block Attribute Value Of External Reference

Get Block Attribute Value

Aspose.CAD for Python API allows you to get an external reference of a block attribute. Aspose.CAD API exposes XRefPathName property to get the external reference of a block attribute in a CadBlockDictionary collection. Following is the code demonstration of getting external reference of a block attribute.

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)