By Dennis Collin
Revit’s Dynamo scripting environment has been available for several years now and can be employed to conduct many tasks from renumbering sheets, exchanging data with Excel to generating geometry. I was recently asked a question about how a project could be cleaned of multiple unused parameters assigned to elements, both project and shared without having toremove them manually, editing families etc.
This can be done with a very simple script with any version of Dynamo that comes with a recent version of Revit. The example displayed has been written with Dynamo 2.13 but could easily be done with earlier versions, although some of the node names have been changed.
In figure 1, 5 parameters need to be removed, they all have different names, some might be shared, some project and are a mix of instance and type. If multiple parameters need to be removed, an option is to rename the parameter adding a uniquely identifiable suffix or prefix which the script can identify and isolate from the parameters that need to be retained. This isolating string can be input into the appropriate node within the script, in this example it is a string node, but could easily be a code block or a list provided by an excel document or text file.
Before running the script, I would strongly recommend backing up the project just in case anything goes astray! The parameters are then renamed by a suitable suffix ‘-D’ which will be selected by the string node in the script. In the example the Fixture Offset and any parameters that need to be retained are left unmodified.
If users find the Dynamo scripting graphic a bit daunting the script can be executed in the streamlined Dynamo Player environment below.
Comments
0 comments
Please sign in to leave a comment.