Adaptive Component - identify rotation angle and rotate

Hi everyone,

I am trying to create a script which will automatically create a clearance area (Adaptive Component family) on top of the Cable Trays but I encountered a problem at placing this clearance on vertical CT. The problem is that the clearance family has a strange rotation and it’s not always on top of the CT. I have attached pictures with my problem and also the dyn file.
Can you guys please guide me to solve this issue ? I would really apreciate your help! Thank you !


Clearance placement_WIP.dyn (65.8 KB)
Clearance Family.rfa (436 KB)

make the family double nested so you can rotate it
Pyramyd with Repeaters on Diagonals.rfa (940 KB)

1 Like

Hi Marcel, thank you for your reply, but I am not sure I got you here, can you please explain to me a bit what you meant ?

Nest your adaptive family in another adaptive family.
When you start your adaptive family, place one point and make it adaptive, click the point and see the rotation angle parameter. Place your already created adaptive family on this point and lock it.
Now you can rotate it. If needed nest it again for rotation in another direction (Z)
Make sure the family is shared so you can access nested families with Dynamo.
(This applies to one-point adaptives)
Use Element.Location and Line.Direction to get the Cable trays direction and match.

1 Like