Set "VoltageType" for panel family

I am trying to configure a panel in dynamo. I can set the Distribution System element type. However some parts of the panel family do not change to the correct voltage. I found a thread that said you need to set the “VoltageType” parameter. I have applied the same method to set that parameter, but the element.setparameterByName node will not set the voltage type. It says “No parameter found by that name” but it is in the list of element types.

I think if I get the voltage type set correctly, the panel will be properly configured.

Can anyone help?

Just like DistributionSysType is not the name of the parameter for the Distribution System, VoltageType is just the element type and not the name of the parameter. I think you’re looking for System Voltage in the family type.

1 Like

Thanks for the quick reply Nick. Unfortunately, “System Voltage” or “SystemVOltage” did not work in my workflow. The only thing I see in the panel family is “Electrical Data” and it is a string like “480 V/3-0 VA”. I have tried to set this parameter before with no luck, but will try again now.

I was trying to choose the voltage for the panel from the lookup table of voltages in MEP Settings->ElectricalSettings → Voltage Definitions. I figured that was tied to the Distribution System lookup table as it has the phase, number of wires, and configuration in there. I thought those two things together (Voltage Type and Distribution System) combined to generate the “Electrical Data” field for the family instance?

Sorry, typo “SystemVoltage” was the second one there.

1 Like

Can you show us your graph and what you’re trying?

I have a panel family that I am trying to configure with Dynamo. The default Distribution System is 480/277 Wye. Panel setup before my code:


I am trying to set everything about the panel using spreadsheet.
I have succesfully set the distribution system to 120/208 Wye (which is an option in my Electrical Settings lookup table with the code below. The Panel looks like this when i do that:


The pull down at the top for distribution setting is blank after I have set the distribution using dynamo.
You can see the distribution setting is correct in the properties. The problem is the Voltage has not changed (as you can see by the “Electrical Data” parameter. I cannot edit the “Electrical Data” parameter directly.
I read a thread where i need to set the Voltage Type from the list available in MEP settings. But I cannot seem to make that happen the same way I did the Distribution system. No parameter found by that name.
Here is the graph for these:


As far as paramaters for the panel (not in MEP settings), i have the following list:


The only parameter data that has voltage (other than dist system) is “Electrical data” row 41. This is a parameter that cannot be written.

image
The error is “The parameter is read only”

I think this Electrical data parameter is constructed by the distribution system information and the Voltage Type information that i cannot seem to set.
I can read the types in and get the index that i want, but i cannot set the parameter by name as i did with Distribution System:

Hopefully I have answered your question.
Thanks for your time!
PS: i cant put more than one screen shot in as a new user… any idea how to fix that? lol

Sorry, I didn’t realize that System Voltage was our custom parameter, but you need to find the parameter associated with your connector voltage.
image

It may be a type parameter (guessing it is since you can’t find it in the instance) that you have to get from the family type.

1 Like

i cannot use Element.SetParameterByName for that?
error is no parameter found by that name:

I am in Revit 2020 for this project.

“System Voltage” is the parameter the we created at our firm. It’s probably not what your family uses. You need to edit your family and find out which parameter is controlling the power connector’s voltage. It may be the default “Voltage” parameter or it may be a custom parameter, but that’s what you need to use. Again, it sounds like it’s a type parameter for you as well, which means you’ll have to set the parameter for the family type, not the instance.

1 Like

Thanks a ton man. I will work on that. I appreciate the direction.
My status just changed so i can post again…haha

@pnortham,
Just want to check that you are grabbing the correct element. I would think that the voltage is a type property vs an instance property. Much like in Revit how you have to click edit type to access more information you have to grab the element type in dynamo to access the same information.

I just want to make sure that you are doing this.

Easy way to do this is to use GetParameterValueByName and use “Type” as the parameterName then try setting the parameter that you want.

1 Like

Thanks Steven.
Yeah i was trying to get away with setting voltage and the distribution system with one generic family type. I have conceded defeat. haha. I appreciate the insight. We should be able to get it handled now.
Thanks!