Rotation of flanges added by dynamo

Hi,

I’m trying to make a dynamo-script for adding flanges next to valves, pumps etc, as the routing preferences cannot be used for our purpose. I’m stuck regarding the rotation of the added flanges: How can I control the rotation of the flanges with dynamo? Currently the flanges are added by the FamilyInstance.ByPoint-node, but I cant figure out how to modify the rotation after the flange is added.

I tried using the node FamilyInstance.ByFace, but the flange family is not face-based, so it will not work.

I have extracted the wanted rotation of the flange as a vector by using Connector.Direction in the MEPover package, as this gives the direction of the connector element on the pump/valve. I just don’t know how to use this info to rotate the flange.

Any help is mostly appreciated!

1 Like

with the FamilyInstance.SetRotation node you can rotate families

Thanks for the suggestion!

Unfortunately, this only rotates relative to the z-axis. So its fine if the pipe is excactly horizontal. But many piper are vertical or sloped. So this node does not really solve the problem.

There is a node called FamilyInstance.FacingOrientation, which output a vector similar to the vector I get from the Connector.Direction-node. But FamilyInstance.FacingOrientation is a get-node, not a set-node, so it doesnt help. But I just mention it to illustrate what I want dynamo to do.

For info: I have found a node in the MEPover package called MEPfittings.ByPointsAndCurve that does the job. More discussion regarding this in the following thread: Automate placing Pipe Accessory (Valves)

1 Like