no I change just the python node
a better way, if the goal is to take the circuits of each selected element
import sys
import clr
import System
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitAPI')
#from Autodesk.Revit.DB import *
import Autodesk.Revit.DB as DB
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
#The inputs to this node will be stored as a list in the IN variables.
if isinstance(IN[0],list):
lst_element = UnwrapElement(IN[0])
else:
lst_element = [UnwrapElement(IN[0])]
lst_pts = []
for elem in lst_element:
lst_system = elem.MEPModel.GetElectricalSystems()
for sys_ in lst_system:
circuitPath = sys_.GetCircuitPath()
lst_pts.append([x.ToPoint() for x in circuitPath])
OUT = lst_pts
1 Like
Where is the second part of the script i.e. the script of the custom node “creating Lines from circuit path load name”?