CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 10655

CAD tip CAD tip # 12777:

   
Question CAD 
 %  platform  category 
Q - question

Arithmetic and trigonometric functions available in Revit expressions.

A - answer You can use the following arithmetic, trigonometric and logic functions in entry fields of dimensional values of Revit parametric objects, including RFA families - the expression is always prefixed with the "=" character:

+ addition
- subtraction
* multiplication
/ division
^ power
() expression separator

ln(expr) - natural logarithm
log(expr) - decimal logarithm
sqrt(expr) - square root
cos(expr) - cosine
sin(expr) - sine
tan(expr) - tangent
acos(expr) - arc cosine
asin(expr) - arc sine
atan(expr) - arc tangent
exp(expr) - e^x
abs(expr) - absolute value
pi - pi (3.1415926536)
round(expr) - rounding to the nearest whole number
rounddown(expr) - nearest lower whole number
roundup(expr) - nearest higher whole number

IF(cond,iftrue,iffalse) - conditional expression
AND(expr) - and
OR(expr) - or
NOT(expr) - negation
< = >  - comparison
 example: =IF(OR(A=1,B=3),8,3)

You need to keep proper dimensional units in the expression results, e.g. log(100) * 1.0m.

Please note that parameter and object names in Revit are case-sensitive, you need to match lower/UPPER case characters.

Revit
100% *  CAD 
24.10.2020    14380×  
Prices - CAD eShop:
applies to: Revit ·

See also:
Tip 14027:3D heart from the heart.
Tip 13906:How to construct a 2D spiral shape in Inventor?
Tip 13583:Evaluate math expressions in AutoCAD DWG texts.
Tip 12749:Generate parametric mathematical 3D surfaces (meshes) in Fusion 360.
Tip 12638:How to use conditional parameter values in Fusion 360?


Back   All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   



Featuring:
Add .CIT raster format support to AutoCAD and Map and Civil 3D
CITin More info


Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist