How can i got all element of any system like pipe or duct (supply air,Supply water)

99% chance the All Elements Of System contains a Python node which you can copy out and paste into your current workspace to get a more meaningful error message.

Do your systems show in the System Browser?

Hi

here an example with Python

code Python (need PythonNet3)

import clr
import sys
import System
#import net library
from System import Array
from System.Collections.Generic import List, IList, Dictionary, HashSet
#
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
import Autodesk.DesignScript.Geometry as DS

#import Revit API
clr.AddReference('RevitAPI')
import Autodesk
from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB

#import transactionManager and DocumentManager (RevitServices is specific to Dynamo)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

clr.AddReference("System.Core")
clr.ImportExtensions(System.Linq)

input_systemType = IN[0]

all_systems = FilteredElementCollector(doc).OfClass(MEPSystem).WhereElementIsNotElementType()\
            .Where(System.Func[DB.Element, System.Boolean](
                                    lambda m : hasattr(m, "SystemType")
                                            and m.SystemType.ToString() == input_systemType))\
            .Select[System.Object, System.Object](System.Func[System.Object, System.Object](
                lambda m: { 'Id_System': m.Id.Value,
                            'Name_System': m.Name,
                            'SystemType': m.SystemType.ToString(),
                            'Elements': list(m.Elements),
                            }
            ))\
            .ToList()
            

OUT = all_systems
2 Likes

yes

Thanks but i want to knw what is wrong in this script

MEPover package has nodes that can achieve this

cant see Element.System in MEPover

the reason it doenst work in your first image is you feed in the element system type and not the element system, and probably need the right ironpython package as well…and the reason @c.poupin code doesnt work for you need pythonNet 3 installed as he mention as well…but you could try here for cpyhon3…could maybe work as well


system.dyn (8.0 KB)

Thanks .got my ans its working i got all element by system name can i get all element of system type .Will try to modified this. not well familier with this

not really sure what you mean…but you could get the element types from these instances…just with ootb Element.ElementType node from these instances

i want elements from system type not system name.

allright…something here maybe…dont think i am the man so, to come it closer then

I don’t know of a node, but I am pretty sure you could build this with about 12 nodes, all of which come out of the box and none of which require any custom scripting (python or design script or otherwise).

  1. Start with a Select Model Element node to allow the user to select an element from the system type they want to review.
  2. Element.GetParameterValueByName to get the “System Type” from the selected element, followed by an Element.ID node to get something you can compare.
  3. All Elements of Category node to get all your elements which might be in the system. It’ll be up to you to put the list of categories together.
  4. Element.GetParameterValueByName node to get the parameter value for “System Type” form all the elements found in step 3, followed by Element.Id to get a comparable value.
  5. == node to compare the element ID values from the selected element (step 2) to the element ID values from all possible system component element ids (step 4).
  6. List.FilterByBoolMask to filter all the elements (step 3) by the boolean values (step 5). The “in” values are the ones which have been added to the same system as the object you had selected in step 1.

All System name in 1 box . any chance to get element ?

Here’s the cleanest way I can make using a string to get all elements of a SystemType. Use MEPSystem class as it covers mechanical and plumbing

1 Like

thanks its working.