Question about BlockInstances

I’ve got an imported STEP file with a bunch of nested BlockInstances. It’s basically a large tree of assemblies and subassemblies.

What I’d like to do is explode these nested instances into a tree of layers that follows the same layout.

It seems like a good idea to ask if anyone knows of any existing code that does does this already, or something similar, so I don’t run off and reinvent the wheel for the 25th time.

Hi @terrence.mitchem,

Here is code sample that demonstrates how to explode a block instance.


Perhaps you can adapt it to your requirements.

– Dale

1 Like


Another question about BlockInstances. How do I retrieve the string for “Type” in Python. See attached pic.