Match orientation of Family to Orientation of Duct

Hi everyone,

I have created a script for placing builders work families where a duct in the host project clashes with a floor from a linked Revit file.
The problem I am having is putting something into the script that can check/match the orientation of the builders work family to the orientation of the duct.


In the image above you can see that all the families along the horizontal section are placed correctly, ie there is a 150mm gap around all sides for this example. If you look at the vertical section, you can see that the builders work family needs to be rotated 90 degrees. I need to build this check into the script because users could draw ducts from different elevations/sections.
Can any one help me with how to identify the orientation of each duct and make sure that the family instance that gets placed matches the duct it is attached to? In this example I also have each of these ducts passing through 3 different floors.

Any help will be really appreciated.
Thanks!

I would get the line that represents the duct and check it’s angle relative to north or whatever you want and then do the math to rotate the families.

1 Like

Hi Sean,

Thanks for your response!

All my ducts in this scenario are vertical ducts. How would I measure the angle of a vertical duct to north? I am trying to make sure that the Width parameter of the builders work, lines up with the width parameter of the duct.

I ran into this issue as well some time ago. My workaround was getting one of the connectors on either side of the duct and then get the BasisY direction of that connector. This will give you a consistent vector in relation to the rotation of the vertical duct. MEPover has nodes for all of the above.

3 Likes

Thank you very much Taco!

I will give this a go today, hopefully I can come right with it.

Exactly what I needed, thank you very much!!

1 Like