Autojoin Geometry


I am trying to join geometry in a specific joinorder and do not want to join geometry which do not intersect.
For example wall should always be cut an columns should be the cutting object.
Mostly i am not sure how to use the list.filterbyboolmask command and how to use multiple loops in an python file.

I followed the steps in the other topic:

but the topic seems to be dead.

I try to improve my dynamo file since i posted there. But now only one or two (structural)-columns joined the wall and still in the wrong order.

In the other python script is changed JoinGeometry to SwitchJoinOrder and IsCuttingElementInJoin for “Switch Join” and “Cutting Element”.

Any thoghts on loops or some kind of workarounds?

Thank you upfront and regards

Joining is working so far. even with new build elements.
Auto Join without Order.dyn (22.9 KB)

Regards to myself,