How could I join lines together?

Here, I detected the location of these pipes. How could I join between these lines?

Attempt-1.dyn (59.7 KB)

My idea: I need to distribute a certain fitting(expansion socket) at equal spaces of 6m(6000) starting from 1st point. In addition to this, each fitting should takes the same size & orientation of the pipe. Attached is my progress so far. Unfortunately I couldn’t attach revit file(larger than 5mb)

You can try using Polycurve.ByJoinedCurves with a large enough tolerance or you may have to get the start and end points of each consecutive pipe in order to draw new lines in between.


Thanks a lot. Nice idea.

Hi @enghamada911 …you can try something here…i use Genius loci “split by point” its create a union…so in your pipesystem just select which fitting you will use for union…think thats the best stable way…give it a try…


Could you try a pipe network with branches?

Here’s a solution.

1 Like

hello @theshysnail …i would do it something like this…but not sure its the question…

1 Like

hello @sovitek It’s workable here. But I have encountered some problems with this kind of workflow.

  • When the pipe is not modeled continuously in other words when you trim to join the pipes their element IDs are not in order and thus you can’t join them as a polycurve unless you do the calculations.

  • When there are branches of course it’s hard to get the polycurves.

1 Like

Should work here…

and for unsorted MEPcurves without fitting…something could work…spring merge


Dear sovitek, Thanks a lot for your reply. Your solution looks wonderful! Could you send me the code please?
Edited: I tried this one(attached), but It doesn’t split pipes by points(I don’t know why)? Could you figure out what I am missing. Regards.


Attempt-3(dynamobim forum).dyn (39.2 KB)

Try something here…

dynfoeum.dyn (27.8 KB)

Thanks a lot dear friend for your reply. My problem now that it keeps give me error, when I try to download “Genius Loci” package. I think this is the main problem now for me!! Do you know how to fix that?

Not sure…here we need @Alban_de_Chasteigner :wink: …but you could try download directly from the web from here and see how that works…


@sovitek: Fantastic my friend :heart_eyes:. Your solution worked fine! You can mark it as a solution as well :sunglasses:
Many thanks to you :slight_smile: :slight_smile:

1 Like