
getvar(viewctr)
With this method, you can also access the user system variables, USERI1-5
and USERR1-5. For example, to retrieve the value stored in USERR2, enter the
following:
getvar(userr2)
Convert Units of Measurement
The
cvunit
function converts either a number or a point from one unit of
measurement to another. See the acad.unt file for a list of units that you can
convert. The syntax is
cvunit
(
value, from_unit, to_unit
)
The following example converts the value 1 from inches to centimeters:
cvunit(1,inch,cm)
Use Standard Numeric Functions
CAL supports the standard numeric functions in the following table.
Numeric functions
Description
Function
Sine of the angle
sin(angle)
Cosine of the angle
cos(angle)
Tangent of the angle
tang(angle)
Arcsine of the number; the number must be between –1 and 1
asin(real)
Arccosine of the number; the number must be between –1 and 1
acos(real)
Arctangent of the number
atan(real)
Natural log of the number
ln(real)
Base-10 log of the number
log(real)
Natural exponent of the number
exp(real)
Base-10 exponent of the number
exp10(real)
Square of the number
sqr(real)
Square root of the number; the number must be nonnegative
sqrt(real)
194 | Chapter 5
Summary of Contents for AUTOCAD 2006
Page 1: ...February 2005 AutoCAD 2006 Command Reference ...
Page 24: ......
Page 30: ...6 ...
Page 212: ...188 ...
Page 448: ...424 ...
Page 554: ...530 ...
Page 584: ...560 ...
Page 588: ...564 ...
Page 660: ...636 ...
Page 750: ...726 ...
Page 760: ...736 ...
Page 960: ...936 ...
Page 1194: ...1170 ...
Page 1244: ...Undo Reverses the most recent change made by TRIM 1220 Chapter 21 ...
Page 1310: ...1286 ...
Page 1328: ...1304 ...
Page 1354: ...Zoom Window Zooms to display an area specified by a rectangular window 1330 Chapter 26 ...
Page 1490: ......