How to retrieve pipe systems through python script

i would like to retrieve all pipes systems trough python script. i did this through nodes. but i would like to learn how it is doing by scrip.

i am new in Dynamo. so please help me.

pipe system type.dyn (8.3 KB)

Hi @shibujoseukken,

Here is the script :

import clr
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument

import Revit

from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Plumbing import *

pipingSystem = FilteredElementCollector(doc).OfClass(PipingSystemType).ToElements()

OUT = pipingSystem

1 Like

can you please provide the reference or links for the below codes.


To access to the PipingSystemType class, you need to import the Autodesk.Revit.DB Plumbing namespace (from Autodesk.Revit.DB.Plumbing import *)

FilteredElementCollector = Creating a Collector of a particular Category of Elements
doc = current doc (doc = DocumentManager.Instance.CurrentDBDocument)
OfClass : (You can find the Class in the API)
.ToElements() = Get Revit Elements returned.

1 Like

i couldn’t find the system class in API