How can I retrieve transforms of sub-blocks?

I managed to get the transforms of “first level” block instances with InstanceObject.InstanceXform , but I also need to get the transforms of the sub-blocks eventually found inside.

I was looking at InstanceDefinition.GetObjects but this tells me WHAT is in the block ; not WHERE it is placed in the main block’s base plane if that object is a sub-block.

Any idea ?

The more I dive into these issues, the more I think @ivelin.peychev is up to something with his suggestion that Blocks should be built through a database system. instead of the present convoluted mess…

Hi @osuire ,
InstanceObject.GetSubObjects will get all the sub-block instances. Then you just call InstanceXform on each of them.

Ok, Got it…
I’ll try that !