CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz]
Cesky English Deutsch
Login/Register:
 Visitors: 2699 

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    635×  
Prices - CAD eShop:
applies to: Revit ·

See also:
Tip 12749:Generate parametric mathematical 3D surfaces (meshes) in Fusion 360.
Tip 12638:How to use conditional parameter values in Fusion 360?
Tip 12600:Parametric 3D curves in Fusion 360.
Tip 11494:Entering decimal values using fractions in CAD applications.
Tip 10231:How to draw spiral in AutoCAD LT?


Back   All CAD Tips All CAD tips&tricks



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:
Export 3D VRML scenes from AutoCAD and Inventor
VRMLout More info


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