Select/Modify an Electrical Circuit connected to an Element?

Hi, I’m new to Dynamo. Is there a way to select and modify the Electrical Circuit connected to an Element?

What I’m trying to do is
-Select the electrical circuit that is connected to a Data Device.
-Read a parameter “DEVICE TAG” from the Data Device element.
-Assign this value to the “Load Name” parameter of the associated Electrical Circuit.

What ends up happening is the load names display the wrong device information and out of order. I wonder if this is in issue with the listing, but I’m not sure how to fix this?

Hi @vchavezNZP6K,

Welcome to the Dynamo community.

I think you’ll have to use the Element.ElectricalCircuit node from the MEPover package.
See if this points you in the right direction.

1 Like

Thank you for the input. I tried installing MEPover v2020.6.2, but I’m getting an error with the node. I’m using Revit 2022, is this what can be causing the issue?

Ah, that pesky error keeps popping up every now and then. If you double click that custom node, you will see an ‘input’ node with the word ‘Element’. Change that capitcal ‘E’ to a lower case ‘e’ ,hit save and close the custom node and that should have resolved the error.

@vchavezNZP6K Download the latest version

I downloaded the latest version and I adjusted the “E” to an “e” on the input of the custom node. That error goes away, but i still am not getting values.

@vchavezNZP6K It’s not working because of API changes post Revit 2021.

Try this: Get Electrical System.dyn (11.2 KB)

toList = lambda x : x if hasattr(x, '__iter__') else [x]
elems = toList(UnwrapElement(IN[0]))


def getSystem(elem):
	sys = elem.MEPModel.GetElectricalSystems()
	return [x for x in sys]

OUT = [[system for system in x.MEPModel.GetElectricalSystems()] for x in elems]
3 Likes

It worked! Thank you for the fast solution!

1 Like