Get connected equipment upstream


I am trying to make a script that takes a pipe, retrieves all connected equipment (i.e mechanical eq.) upstream, counts eq with an identical identifier, and writes count + identifier to the original pipe.

I have a sewage pipe that is connected to 3 toilets, and 3 basins. I want to write “3 toilets, 3 basins” to a downstream pipe, so that it is easy to perform a control.

I have tried with the MEPover node “Pipe upstream components”, but it doesnt seem to work properly (or I am just not using it right).

Any help/tips would be appreciated!


Difficult to say so long we dont have any dataset or other information…it could be a lot of things

Basicly, i have a system like the pictured one. I select a pipe downstream from any equipment, and want the script to count and write all eq to a parameter. My issue is mainly detecting everything upstream from the selected pipe. Here that would be some bends, some pipes and my two nodes (mechanical eq).

Hi Jorgen, you can try to achieve this by using the connectors. select the element for getting the upstream components. Once you get the elements, get the connectors for the elements and then get the elements connected to the element and finally filter for plumbing fixtures. This will give you the data. But, for some reason the pipe upstream doesn’t work for me. I checked by selecting all the elements except the plumbing fixtures to test it and it works. Just make sure pipe upstream works. I’m attaching graph for your information.

Hello Nitesh

Thank you for your input. I am having issues with Upstream components as well, it seems it breaks once it finds an object of the same type. Seems to be a design flaw in my eyes…

I will dive into the custom node to see if I can break that functionality and update this if I figure it out.

Thank you for your insight and time :slight_smile:

1 Like

Thanks Jorgen. Do take a look at this as well. Hope it may give you some more idea

1 Like