Isolate disconnected pipes

Hi,

i’m trying to isolate only disconnected pipes in order to create checking views or export this data in excel.
Starting from pipes list i have extracted a list of connectors using a custom node. Now i have a list of Autodesk.Revit.DB.Connector but i cannot extract any information from those elements.
Any suggestions?
I attach an image in order to understand my actual situation.

Thank you very much.

I am by no means an MEP specialist, but I would guess that getting the connector origin and compare it to pipes curves start or end points could be an option. If so, Bakery has a node called Get Connector.Origin.

Edit: See also:

Like the second link shows you can use this from MEPover package:

image

If the result is an empty list or only a single element then the pipes is not connected on both sides.
Alternatively you could change the python code a bit like this, so you will end up wil a list of booleans indicating whether or not the connectors are connected or not:

import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
#The inputs to this node will be stored as a list in the IN variables.
if isinstance(IN[0], list):
	curves = UnwrapElement(IN[0])
else:
	curves = [UnwrapElement(IN[0])]

bools = []

for curve in curves:
	connMan = curve.ConnectorManager
	bool = []
	for conn in connMan.Connectors:
		if conn.IsConnected:
			bool.append(True)
		else:
			bool.append(False)
	bools.append(bool)

#Assign your output to the OUT variable.
OUT = bools
1 Like

Thanks for your help. I think i’m near to the solution. Now i can see if a pipe is connected or not. But i want to filter those elements using this information in order to compile a project parameter and create filters pipes. How can i do it?

EDIT

I have followed the first method (MEP Curve connected fittings) and the i have filtered by number of elements in sub-list (when connected it is always 2).
Here the result:

Thank you very much for the solution!

1 Like