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:
I’ve tried using SetValueString. The script appears to run with no errors, but it’s not setting the parameters in the file.
SeanP
November 7, 2020, 4:50pm
2
It has to be an ElementId not a string value.
See here may help.
hi Konrad, i try to figure out your Python code, what is BuiltInParameter.GN? well, below captures are my adaption of your exact Python code, seems not updating to my Revit key schedule, well, i just want to find bidirectional way between Excel and Key Schedule, using OOTB nodes only including Python, thanks!
[image]
[image]
[image]
2 Likes
SeanP
November 8, 2020, 1:18pm
3
Here is another link that may help.
Solution to this was found here from @Konrad_K_Sobon from over 4 years ago… I have a long ways to go!
https://forums.autodesk.com/t5/revit-api-forum/key-schedule-revit-api/td-p/5449134
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference('System')
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensi…