how to export a single layer or several layers to png? #444
Unanswered
zhangyang30003
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Added an additional key-word argument Export only the entities on layer "example": from ezdxf import recover
from ezdxf.addons.drawing import matplotlib
def my_filter(e: "DXFGraphic") -> bool:
# return True to draw entity e or False to ignore it
return e.dxf.layer == "example"
# Exception handling left out for compactness:
doc, auditor = recover.readfile("your.dxf")
if not auditor.has_errors:
matplotlib.qsave(doc.modelspace(), "your.png", filter_func=my_filter) See also docs for the drawing add-on: https://ezdxf.mozman.at/docs/addons/drawing.html |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
heeeeeeeeeeeeeeeeelp
Beta Was this translation helpful? Give feedback.
All reactions