Formulas are a very powerful and undervalued feature within Revit. They allow for control of parametric content within a model, and range from simple equations to highly complex solutions.
In this post I will demonstrate a simple formula to control a Text Value with Yes / No parameters. A key thing to remember is that the text you want to display will ALWAYS need to be within "quotation marks"; as is required when defining a text value through the Formula column.
To set up this type of Formula, you need to have at least 1 Yes / No parameter.
I have used a simple If statement to control based on 2 options:
if(Option A, "Title to Match Option A", if(Option B, "Title to Match Option B", "Option not defined"))
This equation refers to when the element is selected (Yes = 1)
When Option A is selected, the text value will constrain to Title to Match Option A.
When Option B is selected, the text value will constrain to Title to Match Option B.
When no options are selected, the text value will constrain to Option not defined.
I like to use these equations to identify when a model is not configured correctly, adding in "checks and balances" to my content.
When BOTH options are selected, I wanted this formula to identify there was an issue with the options. Reorganizing the equation and adding in a statement to identify when both options were selected allowed me to control the output to return the value Resolve Option Issue
if((and(Option A, Option B)), "Resolve Option Issue", if(Option A, "Title to Match Option A", if(Option B, "Title to Match Option B", "Option not defined")))
You don't have to stop here! with slight changes and potentially more options you can further constrain these parameters to suite any scenario.
Helpful Links:
Autodesk - Revit Models - Formulas
Applied Software - Revit Formulas for Parametric Family Creation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.