Back

Formulas & Families

Modeling with Autodesk® Revit® for MEP provides a great benefit in coordination, but firms expect more from their investment in Revit. Improving the design process is a priority, and a powerful way to increase productivity is to make families and schedules that can handle redundant engineering tasks and calculations.  This gives engineers instant feedback that allows them to focus on the big picture. This article will review formulas available to the MEP engineer and ways to leverage them to make design simpler.

Family parameter can be driven by formulas that call on other parameters in the same family. It is very typical to drive the dimensions of forms based off of other dimensions with simple math operators.

Addition           +
Subtraction      -
Multiplication   *
Division           /
Greater Than    >
Less Than        <
Equal               =

Example of Use

If the family type has a dimension that changes based on another dimension in the same family, using a math operator, means that users will only have to change the defining dimension and all other variable dimensions can update automatically. In pipes and conduit, the radius of a fitting is directly related to the diameter of the pipe or conduit. Telecommunications conduit requires even larger radii. This formula will allow users to select the appropriate size pipe with fittings self-sizing their radius.

If forms in a family are proportional, a length dimension can be easily driven by a given width with a formula such as:

Length = Width*2

Adding parentheses and other parameters, these formulas can get more elaborate:

OverallDiameter = ((Duct Radius*2) + (2*Insulation Thickness))

Things get a little more complex with the introduction of conditional statements. Conditional statements such as IF, NOT, and AND give Revit the power to test for conditions otherwise difficult or impossible to sort out with simple math. IF statements are particularly useful for comparing results and setting values based off those results. The basic format of an IF statement is shown below.

IF Statement                          

IF (statement, results if true, results if false)

IF (Length < 30′, 2′ 6″, 4′)
IF the value of the “Length” parameter is less than 30' then return the value 2’-6”, if not, return the value 4'-0".

Example of Use

Drive the distance of the clear space in front of an electrical panel based of the amperage of the panel.

IF (Amps > 240, 36”, 24”) By setting the clear space length for a panel equal to this formula, panels greater than 240 amps will have 36” of clear space and those below will have 24”.

IF statements can also be formatted to return a text string.

IF that Returns a String              IF (statement, “text if true”, “text if false”)

IF (Height > 36”, “Tall”, “Short”)     
IF the value of the “Height” parameter is greater than 36” this parameter will return “Tall”.
IF the value of the “Height” parameter is less than 36” this parameter will return “Short”.

Example of Use

This method can be used to automatically add an “Above Counter” designation to receptacles and switches that have a mounting height over 3’-0”.

IF (Height > 36”, “AC”, “ ”)     
IF the value of the “Height” parameter is greater than 36” this parameter will return “AC”.
IF the value of the “Height” parameter is less than 36” this parameter will return a blank space indicating a normal mounting height.

When a choice needs to be made from many options, nesting IF statements together provides a way of picking a choice from a range.

Nested IF Statements

IF (Value < 2, Choice 1 , IF (CFM < 4, Choice 2, IF (CFM < 6, Choice 3 , Choice 4) ) )
IF the value is less than 2, this parameter will be set to Choice 1
IF the value is less than 4, this parameter will be set to Choice 2
IF the value is less than 6, this parameter will be set to Choice 3
IF the value is greater than 6, this parameter will be set to Choice 4

Example of Use

This method can be used to automatically size the neck of diffusers based off the airflow in the diffuser.

IF (Air Terminal Air Flow < 150 CFM, 0' 6",
IF (Air Terminal Air Flow < 245 CFM, 0' 8",
IF (Air Terminal Air Flow < 350 CFM, 0' 10",
IF (Air Terminal Air Flow < 450 CFM, 1',
IF (Air Terminal Air Flow < 550 CFM, 14",
IF (Air Terminal Air Flow < 650 CFM, 15", 17”))))))

IF the “Air Terminal Air Flow” parameter is less than 150, this parameter value is set to 6"

IF the “Air Terminal Air Flow” parameter is between 151 and 245, this parameter value is set to 8”

IF the “Air Terminal Air Flow” parameter is between 246 and 350', this parameter value is set 10”

IF the “Air Terminal Air Flow” parameter is between 351 and 450', this parameter value is set 12”

IF the “Air Terminal Air Flow” parameter is between 451 and 550', this parameter value is set 14”

IF the “Air Terminal Air Flow” parameter is between 551 and 650', this parameter value is set 15”

IF the “Air Terminal Air Flow” parameter is greater than 650, this parameter value is set 17”

The odd number of 17” will indicate to users that this neck size should be reviewed.

The same method can be used to change the size of electrical conduit based off the number of conductors in it.

Yes/No checks for a true or false condition. In this case the user is just checking to see if something is true. True conditions can be reported in schedules or nested into an IF statement.

Yes/No Condition

Length > 40' 

IF the value of the “Length” parameter is greater than 40' the statement is true and the Yes/No check box is checked.

IF the value of the “Length” parameter is 40' or less the statement is false and the Yes/No check box is NOT checked. 

Combining the previous neck sizing IF statement with a Yes/No statement allows a single family to use an auto-sized neck size or allow the user to override with a manual input.

First create an instance Yes/No parameter called “Use Auto Neck Size” and add it to the diffuser family. Also create an instance parameter to use as an override in the diffuser family. In the image below it is called “Neck Size”.

IF (Use Auto Neck Size, (First check to see if the user wants to use auto neck sizing.)
(IF (Air Terminal Air Flow < 150 CFM, 0' 6", (for flows below 150CFM a 6” neck is used)
IF (Air Terminal Air Flow < 245 CFM, 0' 8", (for flows above 150 and below 150CFM a 8” neck is used)
IF (Air Terminal Air Flow < 350 CFM, 0' 10", (for flows above 245 and below 350CFM a 10” neck is used)
IF (Air Terminal Air Flow < 450 CFM, 1', (for flows above 350 and below 450CFM a 12” neck is used)
IF (Air Terminal Air Flow < 550 CFM, 0’ 14", (for flows above 450 and below 550CFM a 14” neck is used)
IF (Air Terminal Air Flow < 650 CFM, 0’ 15", (for flows above 550 and below 650CFM a 15” neck is used.)
Neck Size))))))), (for flows above 650 the manual Neck Size will be used)
Neck Size) (If the checkbox for this instance isn’t checked, the manual Neck Size is used.)

There will be many other situations where an IF OR or an IF AND is appropriate.

IF OR
IF (OR (A = 1, B = 3), 10, 5)
IF A = 1 or B = 3 this parameter will have a value of 10
IF A is not = 1 and B is not = 3 this parameter will have a value of 5 

IF AND
IF (AND (x = 1, y = 2), 8, 3)
IF x = 1 and y = 2 this parameter will have a value of 8
IF x is not = 1 or y is not = 2 this parameter will have a value of 3

This or That Only with Yes/No Parameter

This example shows how to create a toggle between two Yes/No parameters.



By specifying that Metal cannot be true while Wood is true the user can only specify one of the two materials. They both cannot be checked at the same time. This can be used for visibility where a left or right access panel may be required, but never both.

Yes/No Drives Tag
In this example an exit sign needs to be tagged with the text "STAIR", "EXIT," or nothing. 

A Yes/No parameter is created called "STAIR".

A Shared text parameter is added with a formula to determine if the Exit sign is near a stairway.  

IF (STAIR, "STAIR","EXIT")

If the parameter of STAIR is true, return the text "STAIR", if false return the text "EXIT".

Create a tag that references the shared parameter to show "STAIR" or "EXIT" and don't tag exit signs that should have no text.
 

Pick One and Only One

This example shows how to limit users to selecting only one check box when multiple check boxes are available.

Here the condition number will allow only one parameter to be true in a list. Associated with a type, you could control a ton of things simply by picking the correct type.
 

"Don't Change Me Bro"

If you need some text to NOT change, put the text in the Formula column with quotes around it. It greys it out in the Value column. This should stop the majority of users from changing its value.

For the most part, formulas are simple, but their use can get complex quickly. Practice doing the small things and combine them as needed. The more you use formulas, the more opportunities will present themselves to add productivity to everyday design tasks.

Appears in these Categories

Back