I would like to know on which paperspace each entity in a DXF file would be located. I tried to find this by the code below, but the layout name I got is always the same one for each entity, while there are multiple number of paperspace in the DXF file. How can I get the paperspace for each entity in a DXF file?
# Read a DXF file
doc = ezdxf.readfile(file_path, encoding='shift-jis')
# Print names of Paperspaces
print(doc.layout_names_in_taborder())
# -> ['Model', '0A_Cover', '0B_Number', '0C_List', '01', '01H', '02', '02H', '03', '03H', '04', '04H', '05', '05H', '06', '06H', '07', '07H']
# Print the name of paperspace for each entity in the DXF file
for e in doc.entities:
# Paperspace Name
print(e.drawing.layout().name)
# -> 0A_Cover
# 0A_Cover
# 0A_Cover
# 0A_Cover
# 0A_Cover
# ...
# ...
# The paperspace name is always '0A_Cover' for all entities.