Using Formulas in Revit Families Part 1
How to Use Formulas in Autodesk Revit
To fully utilize the power of parametric content in Autodesk Revit families, it´s important to understand how Revit works with formulas. Though it´s very similar to MS Excel, there are some limitations and software specific issues that you should be aware of.
Steps

Learn how to write a formula for exponentiation:use X raised to the power of Y = X ^ Y

Learn how to write a formula for E raised to an x power
 E is a mathematical constant that is approximately equal to 2.7. It is an irrational number, but if we truncate it to 20 decimals it would be 2.7182818284590452353.
 Revit usage = exp(x)

Learn how to find the circumference and area of a circle with a formula in the program:
 Usage in Revit = pi()
 Circumference = pi() * (Radius * 2)
 Circumference = pi() * Diameter
 Circle Area = pi() * Radius ^ 2

Learn how to find Square Roots of any number in this program.
 Fixed value = sqrt(999)
 Parameter = sqrt(Width)
 Formula= sqrt(Width + Height)

Learn how to solve logarithm problems.
 The logarithm of a number to a given base is the exponent to which the base must be raised in order to produce that number. For example, the logarithm of 1000 to base 10 is 3, because three factors of 10 must be multiplied to yield a thousand: 10 × 10 × 10 equals 1000
 Revit usage = log(1000)

Learn how to force yes/no parameters to be checked or unchecked.
 Force checked = 1 < 2
 Force unchecked = 1 > 2

Learn how to solve conditional statements.Conditional statement uses this structure:

 IF (<condition>, <resultiftrue>, <resultiffalse>)

Supported Conditional Operators
 < Less than
 > Greater than
 = Equal
 / Divide
 AND Both statements are true
 OR One of the statements is true
 NOT Statement is false
 Conditional statements can contain numeric values, numeric parameter names, and Yes/No parameters. Currently, <= and >= are not implemented. To express such a comparison, you can use a logical NOT. For example, a<=b can be entered as NOT(a>b)

Simple IF Statement
 IF (Length < 900, <true>, <false>)

Formula That Returns Strings
 IF (Length < 900, “Opening too narrow”, “Opening OK”)

Using logical AND
 IF ( AND (x = 1 , y = 2), <true>, <false>)
 Returns <true> if both x=1 and y=2, else <false>

Using logical OR
 IF ( OR ( x = 1 , y = 2 ) , <true>, <false>)
 Returns <true> if either x=1 or y=2, else <false>

Nested IF statements
 IF ( Length < 500 , 100 , IF ( Length < 750 , 200 , IF ( Length < 1000 , 300 , 400 ) ) )
 Returns 100 if Length<500, 200 if Length<750, 300 if Length<1000 and 400 if Length>1000
 IF with Yes/No condition
 Length > 40
 Returns checked box (<true>) if Length > 40

NOT with Yes/No condition
 not(Viz)
 Returns checked box (<true>) if Yes/No parameter "Viz" is unchecked, and returns unchecked box (<false>) if Yes/No parameter "Viz" is checked.

IF AND OR Returning the greatest of three values
 Say you have these 3 length parameters, and want a fourth parameter to return the greatest value/length of the 3:
 Length A
 Length B
 Length C
 Return Length (Returns the greatest of the three length parameters)
 Return Length = if(and(or(Length A > Length B, Length A = Length B), or(Length A > Length C, Length A = Length C)), Length A, if(and(or(Length B > Length A, Length B = Length A), or(Length B > Length C, Length B = Length C)), Length B, if(and(or(Length C > Length A, Length C = Length A), or(Length C > Length B, Length C = Length B)), Length C, 0 mm)))
 Another option is to use an extra "Calc" parameter, which is a bit more clumsy but also way easier and more manageable for us mortals.
 Calc = if(Length A > Length B, Length A, Length B)
 Return Length = if(Calc > Length C, Calc, Length C)


Learn how to solve a trigonometry problem in the software.
Video: Formulas and IF Statements in Revit Tutorial
Related News
How to Practice Namasmaran
3 Ways to Booty Pop
Bacon and Eggs
Dakota Johnson Talks Filming Fifty Shades Sex Scenes with Jamie Dornan
How to tighten face skin naturally with face packs and face masks
Spinach and Herb Quiche
How to Make Cards for Valentines Day
ExpertApproved Dos And Don’ts OfHighlights
Naeem Khan SpringSummer 2014 RTW – New York Fashion Week
15 Ways You’re Using Tampons Wrong
Stylish Outerwear Substitutes for A Blazer
Cooking lessons made compulsory
Date: 09.12.2018, 22:43 / Views: 81555