Skip to content

How to get BLKREFS from a BLOCK_RECORD #1157

Closed Answered by mozman
iakovos-panourgias asked this question in Issues
Discussion options

You must be logged in to vote

This function maybe can help: https://ezdxf.mozman.at/docs/disassemble.html#ezdxf.disassemble.recursive_decompose

Recursive decomposition of the given DXF entity collection into a flat stream of DXF entities. All block references (INSERT) and entities which provide a virtual_entities() method will be disassembled into simple DXF sub-entities, therefore the returned entity stream does not contain any INSERT entity.

And if this implementation doesn't fit your needs, look at the source code and make your own function:

def recursive_decompose(entities: Iterable[DXFEntity]) -> Iterable[DXFEntity]:

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mozman
Comment options

Answer selected by iakovos-panourgias
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Issues
Labels
None yet
2 participants