CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.091.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.

CAD tip CAD tip # 6381:

Question

CAD 
 %  platform  category 
A
In AutoCAD table cells and text fields (texts, block attributes) you can use not only the predefined properties, fields and functions but also the standard mathematic (arithmetic and goniometric) functions with dynamic values.

When defining the arithmetic expressions - see Fields > All > Expression - you can use the following functions:

  • +, -, *, /, ^, () = basic arithmetic operations
  • sin(angle) = Sinus of an angle
  • cos(angle) = Cosinus of an angle
  • tang(angle) = Tangens of an angle
  • asin(real) = Arcus sinus
  • acos(real) = Arcus cosinus
  • atan(real) = Arcus tangens
  • ln(real) = Natural logarithm
  • log(real) = Decimal logarithm
  • exp(real) = Natural power
  • exp10(real) = Decimal power
  • sqr(real) = Square
  • sqrt(real) = Square root
  • abs(real) = Absolute value
  • round(real) = Rounded to the nearest integer
  • trunc(real) = Truncated to integer
  • r2d(angle) = Angle in radians converted to degrees
  • d2r(angle) = Angle in degrees converted to radians
  • pi = Pi constant (Ludolf's number)

Example: =atan(pi)

Right-click in the Expression panel of the FIELD dialog and use Insert field... to nest (combine) field expressions and add, subtract, muliply, divide, etc. multiple fields. So you can e.g. multiply the area of the selected closed polyline and its thickness to get the dynamic value of its volume (rt-click, Insert field, object property Area * rt-click, Insert field, object property Thickness). Use "(none)" for formatting the numeric fields.

See video #11

ACADACLT2009ADTCivil
100% *CAD
10.11.2008    41651×  

See also:
Tip 14459:How to replace missing functions min() and max() in Revit expressions?
Tip 14417:Quick calculator on an AutoCAD keyboard shortcut.
Tip 14363:Yesterday's, tomorrow's, past or future date in the DWG drawing.
Tip 14223:Arithmetic operations for renaming blocks, levels, layouts...
Tip 13583:Evaluate math expressions in AutoCAD DWG texts.


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
  



Featuring:
Increase your productivity with our set of add-on functions for AutoCAD Civil 3D
CADstudio Civil Tools More info


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