Filtering unconnected pipes

Hi, need your help finding the pipes that are Not connected so I can determine if it is a tee-fitting or an elbow to vertical pipe.

As can be seen in the pic. I’ve got 57 horizontal pipes and 27 elbows are created, now I need to find those pipes that not has an elbow connected and try to connect to vertical pipes or even make a tee-fitting.

But I cant get the result I need to further process.

Feel free to comment on the approach


@BIM_Mrbrango ,

it seems to be deeper in the element…

i am just able to collect the stuff

#Template 
#DraxlA
#19.07.2023
import clr
import sys 

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
from Autodesk.Revit.DB.Plumbing import *
from Autodesk.Revit.DB.Mechanical import *

clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *

clr.AddReference('System')
from System.Collections.Generic import List

clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

#functions
def tolist(x):
    if hasattr(x,'__iter__'): return x
    else: return [x]

#collector
collector = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_PipeCurves)
all_elements = collector.WhereElementIsNotElementType().ToElements()

elements = UnwrapElement(tolist(all_elements))

output = []

for i in elements:
	output.append(i.IsConnected)



OUT = output

when you look via LOOKupTable, it is in the connector-manager

KR

Andreas

3 Likes

Hi Andreas,

Thanks for mentioning IsConnected, I think I can use that insted of element.id.
I’ll get back to you!