Setting Anchor Elevation for Pipe Hangers

I know their is a topic about pipe hangers already, but im trying to figure out whats wrong with the code im creating. The graph will correctly lay out the hangers on Level 1 but It wont set the anchor height correctly on Level 2. Do i need to modify the family i made to work off levels? Here is the dyn and the revit family im using.

Pipe Hanger.dyn (67.1 KB)
GM Hanger.rfa (328 KB)

check out he Z elevation of the point locations and the level elevation subtracting. seems like a math problem. zoom closer to set anchor to take a better look and show elevation results.

1 Like

@Wuillian_Medrano thank you that was my problem! do you know how i could filter out any vertical pipes from my element list?

yes, i done that also. The Z value of the pipe end/start parameter must equal, filter those with a boolmask and all you got is Horzs.

the only problem with that is if im doing sloped pipe…

I think i can check to see if the start point and end point have the same x and y coordinates then filter ill try that and let you know.

yes give it a shot, i address slopped piping can develop a graph for that task also, but i don’t see much sloped piping. thinking of setting a range to capture only small changes in Z so that you don’t capture straight verticlas.

@Wuillian_Medrano I finished the last script and now im modifying it to work with a trapeze hanger family. how do i get the rotation of the pipe?

(IGNORE THE YELLOW NODES) i have a null value and i didnt clean the list so it turns yellow.

uh, did it rotate previously with the other hanger? search for family rotation treads in this forum, I have seen others provide solutions better than the method I use…which is a Vector In the direction of the Default hanger orientation checking angle and adjusting at each point. there is a better way I think?

the other hanger was just a rod so the rotation didnt matter

I think this node may be the key for rotation as stated on other treads.

I think we need a cloud drive for these files. ill start with the free dropbox subscription. anyone else interested can e-mail to get access. Be great if we all contribute to make these graphs better or tackle this process with a bit more tools than this forum allows.

Dropbox\Dynamo Graphs Repository

To filter the z height differential:
Get z values for end points.
Subtract the two values.
Math.Abs to make a single number. Call this height differential.
Get the length of the line. Call this length.
Divide height differential by length. Call that height length ratio.
Filter elements by height length ratio < X. Included set needs hangers for horizontal systems. Excluded set needs hangers for vertical systems.

@JacobSmall I think i made what you said buy how do i filter it?

@JacobSmall I got it to filter out the verticals byt now it doesnt work on some of the horizontal points…

Looks like an issue with the point at segment length node. What’s the error and are there any odd outputs?

Its yellow because i have a null at the bottom of the list. it still populates the other good values

and what is the error and the error in the second yellow node if you filter out the nulls with a list.clean node?


Fixed the script this morning. Works for the normal hanger and trapeze hanger family.

Revit Families and DYN
Pipe Hanger Trapeze.dyn (115.3 KB)
Hanger.rfa (328 KB)
Trapeze Hanger.rfa (336 KB)

uh, dyn is not downloading. ( email me @ )Your script is much cleaner looking than mine.
I was also attempting to have dynamo calc the point load at each hanger. I think we can have the hanger detect intersecting pipes between hanger and list total weight at each point, fill up a shared parameter, along with hanger mark. only got a bit started on this approach. Once I get something going we can get another thread going.

1 Like