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
yes
Thanks but i want to knw what is wrong in this script
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 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).
- Start with a
Select Model Elementnode to allow the user to select an element from the system type they want to review. Element.GetParameterValueByNameto get the “System Type” from the selected element, followed by anElement.IDnode to get something you can compare.All Elements of Categorynode to get all your elements which might be in the system. It’ll be up to you to put the list of categories together.Element.GetParameterValueByNamenode to get the parameter value for “System Type” form all the elements found in step 3, followed byElement.Idto get a comparable value.==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).List.FilterByBoolMaskto 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.
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
thanks its working.











