Revit Formula: Constraining Text Values with Family Type Parameter

RevitFormulas-FamilyTypeParam-Text.jpg

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 Controlthe text value will constrain to Operable Unit

kristinayoungblut_0-1656030321670.png

 

If Component 1 does not match the control family type parameter, Option 1 Controlthe text value will constrain to Stationary Unit

kristinayoungblut_1-1656030655039.png

 

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"))

kristinayoungblut_2-1656031710533.png

 

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")))

kristinayoungblut_3-1656032306783.png

kristinayoungblut_0-1656032860562.pngkristinayoungblut_1-1656032866995.pngkristinayoungblut_2-1656032879832.png

 

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 

RevitIQ - Getting to know Revit formulas!

Autodesk - Other Revit Formula Posts

10 Comments