I would like to change a parameter value inside a lot of family loaded in a project with a SCRIPT.
Anybody know how to run a script that goes inside all object in the project, change a parameter value and then reload it inside Revit Project ?
Thanks for your time
Don’t use the Parameter node as pictured, this has a different use within workflows.
Instead use the Element.SetParameterByName node
Though you are trying to change a
Family parameter that is usually set within the Familiy Editing environment, so a slightly different workflow will be needed.
You may need to look into ‘background open’ workflows to open a bunch of Family documents, adjust the parameters, save, and reload into the Project environment.
Have a look here for a start
I’m wanting to get the values of specified parameters within RFA background-opened in a chosen library location, and if they have no value then input a value based on an excel list.
So far I am able to retrieve all RFA with their paths, and background-open them. Now I am stuck at python in trying to get the FamilyParameter values. I’m sure I’m missing something really obvious but I’m stuck.
Here’s my python:
# Retrieve family parameters and selected values
Try the node called “Element.SetParameterValueByName”
And that parameter looks like a boolean to me (true/ false) so feed it a boolean.
Hey, thanks for the tips, but when I try to do this with the value “0” to uncheck the parameter Always vertical, it does change the value to “0” in Dynamo but not inside Revit, the process of changing the value and reimport the object inside Revit is not processing…
when I check doing getparametervaluebyname after setting the parameter, it seems alright but not in Revit.
Any idea ?
@Eric_Dynamo try with a
Boolean node instead of 0/1 integers
@Eric_Dynamo May be you should check out this. I had also the same issue but then I got the solution. You should check this out
Hi all, I am trying to set the structural parameter check/uncheck of a structural wall element.
Please let me know how to check and uncheck parameter of an element ? somehow I manage to get the parameter details but getting difficulty in setting the parameter like checkbox.
The code goes as below:
sys.path.append('C:\Program Files (x86)\IronPython 2.7\Lib')
from System.Collections.Generic import *
If that is a type parameter then I think you need to go the long way. You can collect and export all those families to a directory and change values and re-import into project. This can be done in single graph.