Place & Rotate family to match duct orientation

Hi all,

I know there are many posts on the forum relating to placing and rotating, but I haven’t been able to find one pertaining to my situation.
All I want to do is place a family at clash points between a duct and a wall, which i have been able to do. Now, I need to rotate this family to match the direction of the duct, but I cant find anything with my knowledge that I can use to rotate the family against. The duct produces a Line and not a curve item, so I couldn’t use the curveelement.curve node and get vectors using that method. I cant just rotate the family by 90° as the duct angles vary and I want to do this for a lot of items simultaneously.

This is the section I have been trying to play around with to build a vector, which I actually have, but now I don’t know how to rotate the family by using a vector.

If someone could help me with this I would be grateful!

Maybe the Line.Direction node will help.

That does get the vector yes, but I am still unsure about what to do with that vector once I have it. I need to get the angle of that vector, then get the angle of the duct, and rotate the object to match the angle of the duct.

Managed to come right, the solution was as follows:
From the ‘curves’ output of the ‘Element.Location’ node, plug it into the line direction for the vector, then measure the vector against a standard yaxis, then perform the rotation on the family instance.

1 Like