I am trying to use the “Set BuiltIn Parameter” node from “Archi-lab_Grimshaw” package to change the curtain wall parameters like Horizontal division and Vertical Division. I came across this post similar to my question but none of those steps was helpful for me.
So i have some questions regarding this:
What kind of node should I input in the “ParameterName” ? I tried using “Get BuiltInParameter Name” from ArchiLab and also “BuiltInParameter.ByName” from Clockwork.
Should the “Elements” and “ParameterValues” input be a List ? I tried using both with and with out list still the error line 65 follows me.
- Why does the “Get BuiltInParameter Name” becomes null after i has been ran once.
I tried reading python script in the package to debug the error and it all looks Old high German for me now. Please guide me where I am going wrong.
You need a proper BuiltInParameter name. They are usually all caps like this: LEVEL_ID or TEXT_TEXT etc. You can use Revit Lookup tool to find a name of the built in parameter. That node from archi-lab package that used to work no longer does. It’s something about Dynamo 1.2 that kills it and I haven’t figured out how to make it work just yet. I will update it someday. In the meantime try this:
# Copyright(c) 2016, Konrad K Sobon
# @arch_laboratory, http://archi-lab.net
# Import Element wrapper extension methods
# Import RevitAPI
from Autodesk.Revit.DB import *
pyt_path = r'C:\Program Files (x86)\IronPython 2.7\Lib'
#The inputs to this node will be stored as a list in the IN variable.
dataEnteringNode = IN
if isinstance(IN, list):
params = IN
params = [IN]
def ProcessList(_func, _list):
return map( lambda x: ProcessList(_func, x) if type(x)==list else _func(x), _list )
def GetBipName(e, name=IN):
element = UnwrapElement(e)
p = next((x for x in element.Parameters if x.Definition.Name == name), None)
if p != None:
errorReport = None
output = ProcessList(GetBipName, params)
# if error accurs anywhere in the process catch it
errorReport = traceback.format_exc()
#Assign your output to the OUT variable
if errorReport == None:
OUT = output
OUT = errorReport
Many thanks @Konrad_K_Sobon.
I understand the problem now why it wasn’t working earlier, but your script works only for the Instance parameter like “Marks”, I would like to change the Type parameters for instance say “Fire Rating” for the door, I thought the “Set BuiltIn Parameter” node would change the values of the Type properties too please correct me If i have misunderstood. Also I can’t install Revit Lookup in this PC because of the admin rights, so I tried to retrieve the name of the “BuiltInParameter” using clockwork node then the error pops up again. Below are the two images showing my tests
Don’t know how to go ahead with this till i get “Revit Lookup”.
@Raja Have a look at this. (twitted by @Zach_Kron)
Thanks a lot @salvatoredragotta, i didn’t know that “set parameter value by name” could get this job done. I still have some more questions regarding it but since this is going off topic I will start a new post.