Setting a Key Parameter of an element

I have python script that is using an excel file to set room parameters. The only parameter I’m having trouble setting is a KEY parameter for the occupancy type. I’ve seen many posts around talking about key schedules but I don’t want to edit anything about the key schedule. I just want to set the key parameter. I’m getting this error:
image


I’ve tried using SetValueString. The script appears to run with no errors, but it’s not setting the parameters in the file.

It has to be an ElementId not a string value.

See here may help.

2 Likes

Here is another link that may help.