Numerical Functions (AutoCAD Mechanical Toolset)

Even if the argument x is a text, the function converts it to a number. If conversion is not possible, the program generates an error.

ABS(x)

Returns the absolute value of x.

ACOS(x)

Returns the arccosine (inverse cosine) of x, in radians.

ASIN(x)

Returns the arcsine (inverse sine) of x, in radians.

ATAN(x)

Returns the arctangent (inverse tangent) of x, in radians.

COS(x)

Returns the cosine value of x, where x is an angle measured in radians.

EXP(x)

Returns e raised to the power of x. The constant e is taken as 2.718282

CEILING(x, number_of_decimal_places)

Rounds up x to the specified number of decimal places. For example, CEILING(8.546, 1) is equal to 8.6.

FLOOR (x, number_of_decimal_places)

Rounds down x to the specified number of decimal places. For example, FLOOR(8.546, 1) is equal to 8.5.

INT(x)

Rounds down x to the integer. For example, INT(2.97) is equal to 2. For negative values, x the return value is zero.

LN(x)

Returns the natural logarithm of x.

MAX(x1, x2,...)

Returns the biggest number. The function can take up to 20 arguments.

MIN( x1, x2,...)

Returns the smallest number. The function can take up to 20 arguments.

MOD(x1, x2)

Returns the remainder of the integer division x1/x2. Both arguments must be integers.

PI()

Returns the value of the constant PI (3.141592653589....)

SIN(x)

Returns the sine value of x, where x is an angle measured in radians.

SQRT(x)

Returns the square root of x.

TAN(x)

Returns the tangent value of x, where x is an angle measured in radians.

TEXT(x, format)

Converts x to a text, formatted with leading zeros and decimal places as specified in format argument. The format argument is a text like “0.00” or “000.00”, and so on. For example, TEXT(5.1246,”000.00”) evaluates to “005.12”.

DIMSTYLEANG(x, style)

Converts x to the angular data format. The style value is a valid dimstyle name existing in the current drawing. The text is formatted by using the dimstyle setting. The result text can contain other MTEXT formatting sequences (color, font, text size).

DIMSTYLELIN(x, style)

Converts x to a linear value. The style value is a valid dimstyle name existing in the current drawing.