This post will demonstrate a simple formula to control a Text Value with Family Type parameters.
It is important to remember 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.
You will also need a control Family Type parameter that identifies WHICH nested families to utilize within the model. You can not use a Family Type parameter value in an equation, so set up your control parameters before developing your equation.
This first example shows a simple If statement with 1 option:
if(Component 1 = Option 1 Control, "Operable Unit", "Stationary Unit")
This equation controls the text parameter as a conditional statement, an either/or solution.
When Component 1 matches the control family type parameter, Option 1 Control, the text value will constrain to Operable Unit
If Component 1 does not match the control family type parameter, Option 1 Control, the text value will constrain to Stationary Unit
Now, what about when we have mixed options? With a simple alteration and addition, we can expand this conditional statement to account for those options.
if(and(Component 1 = Option 1 Control, Component 2 = Option 1 Control, Component 3 = Option 1 Control), "Operable Unit", if(and(Component 1 = Option 2 Control, Component 2 = Option 2 Control, Component 3 = Option 2 Control),"Stationary Unit","Mixed Operation Units"))
Are your options not so straightforward? Do you need more to add more depth to your equation? No problem, conditional statements have you covered!
if(and(Component 1 = Option 1 Control, Component 2 = Option 2 Control, Component 3 = Option 2 Control), "Left Hand Operation", if(and(Component 1 = Option 2 Control, Component 2 = Option 2 Control, Component 3 = Option 1 Control), "Right Hand Operation", if(and(Component 1 = Option 2 Control, Component 2 = Option 1 Control, Component 3 = Option 2 Control), "Center Unit Operational", "User Defined Operation")))
Check out these helpful links to learn more about Revit Formulas and Family Type parameters.
Autodesk - Community Conversations - Favorite, Fabulous, Formulas for Families in Revit with @donnia.tabor-hanson
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.