Need help with automatically setting secondary distribution system for electrical equipment

Hi everyone,

I’m working on automating the process of setting the transformer secondary distribution system parameter using a script. This task is both tedious and often overlooked when creating an electrical distribution system for connecting downstream panelboards to a transformer family.

However, I’m running into issues with the script. Not only am I encountering errors, but I’m also unable to determine the parameter type because it’s built into the electrical equipment family and isn’t editable.

I’ve attached my current script and a few images of the graph as well as the parameter location in the Revit family for reference. Any insights or assistance would be greatly appreciated!


Set Secondary Distribution Systems For Transformers.dyn (21.8 KB)


Thanks

FilterByBoolMask requires an input of boolean values (true or false) to match the list of elements to be filtered. It then filters those elements based on the matching boolean’s value. Fixing that may help clear up a few things in your graph logic.

As for testing a parameter type, I recommend setting the parameter value of a known element and then getting that value back via Dynamo. That will show you the object type that the parameter is expecting. In this case, Distribution System Types are their own elements defined in the Electrical Settings so I’m guessing the parameter requires an Element/Id. You should be able to retrieve them from your project using Element Classes and All Elements of Class.

Thanks Nick! I really appreciate your feedback and help with this request.

Update: I discovered that the “secondary distribution system” parameter is not a parameter you can do anything with in Dynamo.

What do you mean by this? Dynamo has full access to the Revit API. Parameters are available and modifiable via the API. What exactly are you wanting to do and what seems to not be working?

You can get and set the parameter like any other. You just have to provide the correct arguments.

2 Likes

Oh nice… I wasn’t aware of the “element class” node. I was able to get it to work with your input. See Image below for some adjustments I made for my specific application.

Thanks again Nick!