You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I was traversing the entities in msp, some entities were not extracted. In my dxf file, these entities in the following image belong to the layer of "00-备注信息不打印".
But when I ran the following code, there was no result. May I ask how to solve it. doc = ezdxf.readfile('test.dxf') msp = doc.modelspace() for entity in msp: if entity.dxf.layer == '00-备注信息不打印图层': print(entity.dxftype())
I checked the layer table and the status of the layer, and the return seems to be fine
`layers = doc.tables.layers.entries.keys()
print(layers)
my = doc.layers.get('00-备注信息不打印图层')
print(my.is_on())
print(my.dxf.name)
print(my.dxf.plot)`
This discussion was converted from issue #1086 on May 22, 2024 15:22.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
When I was traversing the entities in msp, some entities were not extracted. In my dxf file, these entities in the following image belong to the layer of "00-备注信息不打印".

But when I ran the following code, there was no result. May I ask how to solve it.
doc = ezdxf.readfile('test.dxf') msp = doc.modelspace() for entity in msp: if entity.dxf.layer == '00-备注信息不打印图层': print(entity.dxftype())I checked the layer table and the status of the layer, and the return seems to be fine
`layers = doc.tables.layers.entries.keys()
print(layers)
my = doc.layers.get('00-备注信息不打印图层')

print(my.is_on())
print(my.dxf.name)
print(my.dxf.plot)`
This is the relevant file and code:
ralated file.zip
All reactions