Find and purge unused blocks #1188
mozman
started this conversation in
Show and tell
Replies: 0 comments
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.
-
An often asked feature is to find and remove unused (unreferenced) block definitions.
The
ezdxf.blkrefs
module provides a block reference counter for this task:Setting
safe
toFalse
is important to remove unused anonymous blocks such as those used by the DIMENSION entity. Thedelete_block()
method does not delete anonymous blocks in safe mode because finding all references is costly and is not implemented.I added the new function
ezdxf.blkrefs.find_unreferenced_blocks()
in v1.3.5 to simplify this task:Beta Was this translation helpful? Give feedback.
All reactions