Copy Link
Add to Bookmark
Report

Revit: Valid Formula Syntax and Abbreviations

AniphaeS's profile picture
Published in 
Architecture
 · 26 Feb 2020

Formulas support standard arithmetic operations and trigonometric functions.

Formulas support the following arithmetic operations: addition, subtraction, multiplication, division, exponentiation, logarithms, and square roots. Formulas also support the following trigonometric functions: sine, cosine, tangent, arcsine, arccosine, and arctangent.

The valid formula abbreviations for arithmetic operations and trigonometric functions are

  • Addition— +
  • Subtraction— -
  • Multiplication—*
  • Division—/
  • Exponentiation—^: x^y, x raised to the power of y
  • Logarithm—log
  • Square root—sqrt: sqrt(16)
  • Sine—sin
  • Cosine—cos
  • Tangent—tan
  • Arcsine—asin
  • Arccosine—acos
  • Arctangent—atan
  • 10 raised to an x power—exp(x)
  • Absolute Value—abs
  • Pi—pi (3.1415926...)

You can enter integers, decimals, and fractional values in formulas, using normal mathematical syntax, as shown in the examples below:

  • Length = Height + Width + sqrt(Height*Width)
  • Length = Wall 1 (11000mm)+ Wall 2 (15000mm)
  • Area = Length (500mm) * Width (300mm)
  • Area = pi() * Radius ^ 2
  • Volume = Length (500mm) * Width (300mm) * Height (800 mm)
  • Width = 100m * cos(angle)
  • x = 2*abs(a) + abs(b/2)
  • ArrayNum = Length/Spacing


You can use the round function for values in formulas.

  
Function syntax Description Examples

round(x) The round function returns a value round(3.1) = 3
rounded to the nearest whole number. round(3.5) = 4
It doesn't take into consideration round(-3.7) = -4
rounding direction.

roundup(x) The roundup function returns a value roundup(3) = 3
to the largest integral value greater roundup(3.1) = 4
than or equal to x. roundup(-3.7) = -3


rounddown(x) The rounddown function returns a value rounddown(3) = 3
to the smallest integral value less than rounddown(3.7) = 3
or equal to x. rounddown(-3.7) = -4


Parameter names in formulas are case sensitive. For example, if a parameter name begins with a capital letter, such as Width, you must enter it in the formula with an initial capital letter. If you enter it in a formula using lower-case letters instead, for example, width * 2, the software will not recognize the formula.


Note: It is recommended that you do not use a dash (-) when naming parameters.

Source: https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/Revit-Model/files/GUID-B37EA687-2BDF-4712-9951-2088B2A8E523-htm.html

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT