Joining Multiple Pipes

Hi everyone,

I’m about to create a script to join multiple pipes and I would like to ask for some tips or ideas how to do that . All the pipes would be the same type, size, elevation and even aligned.
Right know I’m using “Trim/Extend to Corner” feature to do so, but it’s quit hard when you need to repeat this command 30 times or more.

The idea would be to select all the pipes and join them creating only one element (pipe).

Here’s where I started, but I think I can’t solve it with the nodes. I guess I need some Python input here.

Please share your thoughts.


In this case I think the easiest way would be to just take the minimum and maximum point of the pipes and create a new pipe from those 2 points and then delete all the old pipes. The Revit API does not really provide a method to trim pipes like when you do it manually within the Revit UI.


Hi T_Pover,

Thank you for your response. Creating a new pipe by 2 points is not really an option since every piece of thepipe has some items on it. So all the pieces should stay as it is.

Anyway, thanks for letting me know. I’ll mark your answer as a solution.