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: 10071

CAD tip CAD tip # 13583:

   
Question CAD 
 %  platform  category 
Q - question

Evaluate math expressions in AutoCAD DWG texts.

A - answer If you have a drawing with texts containing arithmetic expressions of any complexity, you can use the freeware utility EvalText to evaluate those expressions and optionally write back the results.

Download the EvalText LISP file from Download, load it into your AutoCAD session with APPLOAD and type the EVALTEXT command to start the tool. Select all texts containing at least two numbers and formatted as a proper arithmetic expression by the VBscript rules (syntax) - e.g. 5*(3+5*4.8)^2. EvalText displays the result (3645 in this case) and you can optionally write back the result over the original expression.

In addition to standard arithmetic functions and parentheses, you can use the following functions in these expressions:

  • Int - integer part
  • Fix - integer part
  • Log - natural logarithm
  • Oct - octal value
  • Hex - hexadecimal value
  • Rnd - random number (0-1)
  • Sgn - sign of the value
  • Sqr - square root
  • Abs - absolute value
  • Exp - e raised to the value
  • Sin - sinus
  • Cos - cosinus
  • Tan - tangens
ACADADTACADMPlantMapCivil3D
100% *  CAD 
20.12.2022    42684×  

See also:
Tip 12777:Arithmetic and trigonometric functions available in Revit expressions.
Tip 12624:How to enter dimensions in Revit using other units?
Tip 12002:Arithmetic expressions with measured distances in AutoCAD.
Tip 11994:How to scale a 3D model to a given size in Fusion 360?
Tip 11721:A handy calculator - expression evaluator in 3ds Max.


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