Acces MLEADER content #916
-
Hello everybody! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
The Printing the content and the line vertices of MULTILEADER entities that have a MTEXT context: import ezdxf
doc = ezdxf.readfile("your.dxf")
msp = doc.modelspace()
for mleader in msp.query("MULTILEADER"):
# skip BLOCK context
if mleader.has_block_content:
continue
print(mleader.context.mtext.default_content)
# maybe multiple leaders (left and/or right)
for leader in mleader.context.leaders:
# maybe multiple lines per leader
for line in leader.lines:
# the first vertex is the target point
print(line.vertices[0]) The docs and further links for MULTILEADER/MLEADER can be found here: https://ezdxf.mozman.at/docs/dxfentities/mleader.html |
Beta Was this translation helpful? Give feedback.
You are using an old version of
ezdxf
, the current version is v1.0.3, check your version by: