# Segregation of Main Pipe & Branch pipes in sequence of a single network

**URL:** <https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802>\
**Category:** Revit\
**Tags:** mep\
**Created:** [August 23, 2024, 7:42am UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802 "2024-08-23T07:42:07Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sriram.Rajagopal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sriram.rajagopal/32/191994_2.png) [@Sriram.Rajagopal](https://forum.dynamobim.com/u/Sriram.Rajagopal)\
**Post date:** [August 23, 2024, 7:42am UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/1 "2024-08-23T07:42:07Z")

</div>

Hello folks, I would require your support in identifying the main & Branch pipes of Sanitary System in a sequence from top to bottom or opposite in single network. Below I have attached the snap for reference

 ![Untitled](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/8/98f809f374d9935304cb3651a4a6d87974608bb0.png)

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [August 23, 2024, 9:29am UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/2 "2024-08-23T09:29:40Z")

</div>

> [@How to get help on the Dynamo forums](https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677):
>
> One of the main goals of the Dynamo community is to help others. One way to do that is by answering your questions. But to get the right answer, you’ll first have to ask your question in the right way. Although people are generally very helpful, there are things you can do to improve your chances of getting good and quick answers. Below you will find some suggestions on how to achieve that. Do not think of these suggestions as rules and especially do not take them as a guarantee of getting an an…

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [August 23, 2024, 9:35am UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/3 "2024-08-23T09:35:36Z")

</div>

Hello @Sriram.Rajagopal and welcome to the forum, best you show how far you are in Dynamo and we can try help from there…but guess MePover, [Openmep](https://forum.dynamobim.com/t/openmep-package-feedback-thread/) could help here

---

<div class="post-metadata">

**Author:** ![chuongmep](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/chuongmep/32/197537_2.png) [@chuongmep](https://forum.dynamobim.com/u/chuongmep)\
**Post date:** [August 23, 2024, 9:59am UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/4 "2024-08-23T09:59:36Z")

</div>

The idea here is you can use node `GetElementConnectedWith` inside [OpenMEP](https://forum.dynamobim.com/t/openmep-package-feedback-thread/86350) package to get all the element belong to main pipe, and then try check with direction to find the branch pipe. The rule here is check direction compare with main pipe selected. It can’t make sure 100% is perfect but you can try.

---

<div class="post-metadata">

**Author:** ![Sriram.Rajagopal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sriram.rajagopal/32/191994_2.png) [@Sriram.Rajagopal](https://forum.dynamobim.com/u/Sriram.Rajagopal)\
**Post date:** [August 23, 2024, 10:13am UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/5 "2024-08-23T10:13:52Z")

</div>

@bvs1982 thank you for letting me know the procedure. I’ll follow the set of instructions in future topics.

---

<div class="post-metadata">

**Author:** ![Sriram.Rajagopal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sriram.rajagopal/32/191994_2.png) [@Sriram.Rajagopal](https://forum.dynamobim.com/u/Sriram.Rajagopal)\
**Post date:** [August 23, 2024, 10:16am UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/6 "2024-08-23T10:16:41Z")

</div>

Hi @sovitek ,

Thanks for your warm welcoming!

My ultimate goal is to create a schematics of Plumbing System in a drafting view with reference to the 3D model. I can create the 2D symbol with reference to the Plumbing Fixtures in each level. To achieve my goal, I would require the segregation of main pipe and branch pipes and it should be mapped in sequence for the purpose Grouping and sorting. I have tried MEpover package, Its working well in collecting all elements in the network. But unfortunately its not in sequential order which I’m expecting. As per your instructions I’ll try [openMEP](https://forum.dynamobim.com/t/openmep-package-feedback-thread/) package and I’ll update the status accordingly.

Below I have attached the Revit and Dynamo file for reference  
[PLB\_sample.rvt](https://forum.dynamobim.com/uploads/short-url/fSA5nPgzqGqotBB32SVaRaohXuc.rvt) (3.3 MB)  
[PLB\_220824.dyn](https://forum.dynamobim.com/uploads/short-url/fIxvVrf64sHWS9E2X3F42jMRIaF.dyn) (337.7 KB)

---

<div class="post-metadata">

**Author:** ![Sriram.Rajagopal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sriram.rajagopal/32/191994_2.png) [@Sriram.Rajagopal](https://forum.dynamobim.com/u/Sriram.Rajagopal)\
**Post date:** [August 23, 2024, 10:17am UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/7 "2024-08-23T10:17:54Z")

</div>

Thank you @chuongmep, I’ll try it and let you know

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [August 23, 2024, 10:30am UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/8 "2024-08-23T10:30:08Z")

</div>

yeah i have made some similar, cant remember how i do it, but remember it isnt was so easy…what i do was actuelly similar to how Magicad do it…and it isnt 100 % automated…depends ;)…im not at my revit pc before monday…i will try i can find it again and share it here…

---

<div class="post-metadata">

**Author:** ![Sriram.Rajagopal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sriram.rajagopal/32/191994_2.png) [@Sriram.Rajagopal](https://forum.dynamobim.com/u/Sriram.Rajagopal)\
**Post date:** [August 23, 2024, 10:58am UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/9 "2024-08-23T10:58:03Z")

</div>

Thank You @sovitek

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [August 23, 2024, 11:30am UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/10 "2024-08-23T11:30:11Z")

</div>

Maybe this will get you somewhere.

> [@Assigning serial number to the pipe as water move in the pipe stream](https://forum.dynamobim.com/t/assigning-serial-number-to-the-pipe-as-water-move-in-the-pipe-stream/47595/4):
>
> I have resolve my problem using “Element in connected network” node from MEPover package. and I am getting solution as mention in the sample file. Hope this will give you, alternate approach to resolve your problem.

Or look through these topics

[https://forum.dynamobim.com/search?q=pipe%20system%20flow](https://forum.dynamobim.com/search?q=pipe%20system%20flow)

---

<div class="post-metadata">

**Author:** ![Sriram.Rajagopal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sriram.rajagopal/32/191994_2.png) [@Sriram.Rajagopal](https://forum.dynamobim.com/u/Sriram.Rajagopal)\
**Post date:** [August 23, 2024, 12:47pm UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/11 "2024-08-23T12:47:41Z")

</div>

Thanks for sharing the reference 👏 . I’ll try it

---

<div class="post-metadata">

**Author:** ![danielU3R39](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/danielu3r39/32/97504_2.png) [@danielU3R39](https://forum.dynamobim.com/u/danielU3R39)\
**Post date:** [August 23, 2024, 3:10pm UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/12 "2024-08-23T15:10:20Z")

</div>

@Sriram.Rajagopal probably the best way is to use x,y coordinates to determine the sequence of the fixtures

---

<div class="post-metadata">

**Author:** ![collin.blatchford](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/collin.blatchford/32/196153_2.png) [@collin.blatchford](https://forum.dynamobim.com/u/collin.blatchford)\
**Post date:** [May 1, 2025, 3:27pm UTC](https://forum.dynamobim.com/t/segregation-of-main-pipe-branch-pipes-in-sequence-of-a-single-network/103802/13 "2025-05-01T15:27:07Z")

</div>

Has there been any progress on this? I’m looking into solving the same issue but for electrical conduits. All I really need is to order a list for a conduit run from an arbitrary start and finish. Using MEPOver and [OpenMEP](https://forum.dynamobim.com/t/openmep-package-feedback-thread/) I can get all elements in conduit run and filter to only look at elements with unused connections (the the arbitrary starting point). Then using [OpenMEP](https://forum.dynamobim.com/t/openmep-package-feedback-thread/) I was hoping to use OpenMEPs all connected elements in network with those starting points but the order is not 100% which would be fine if it was wrong in the same way consistently but it is not. The list is such that the start point at index 0 is never correct and needs to be flipped with usually the last indexed value or index 1. Not sure what is going on. If anyone is interest I’ll share what I can but my .dyns are pretty sloppy as I am not dynamo expert.
