Adding a prefix to Revit’s Mark parameter with Dynamo scripting – Part 2

Marketing
Marketing
  • Updated

By Dennis Collin

Adding_a_prefix_to_Revit_s_Mark_parameter_with_Dynamo_scripting___Part_2_-_1.JPG

Following on from my recent post about using Dynamo to create list of Revit components and combining such lists together, it is frequently necessary to write that amended list back to Revit. Dynamo can easily do this by using the ‘Set Parameter By Name’ node. A common application of this is to reset mark values of any Revit component to desired project settings and conventions.

Adding_a_prefix_to_Revit_s_Mark_parameter_with_Dynamo_scripting___Part_2_-_2.JPG

In this case I am using a Door which has had a ‘D’ prefix added to the number and the updated list of door numbers is written back to the project. My initial unmodified script could potentially add multiple ‘D’ prefixes, however, a simple Boolean filter sorts the data so that only one prefix is added.

Adding_a_prefix_to_Revit_s_Mark_parameter_with_Dynamo_scripting___Part_2_-_3.JPG

When working with any Dynamo script it is good practice not to rename the nodes, but to utilise the group function and assign contrasting colours with some explanatory notes to explain each stage of the script. A clearly laid out function is much easier to debug or to customise at a later stage. I have also utilised multiple code block nodes to reference to aid clarity and fault tracing.

Adding_a_prefix_to_Revit_s_Mark_parameter_with_Dynamo_scripting___Part_2_-_4.JPG

Adding_a_prefix_to_Revit_s_Mark_parameter_with_Dynamo_scripting___Part_2_-_5.JPG

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.