AutoCAD 2008 User's
Guide > Create and Modify
Objects > Use Precision
Tools > Use a
Calculator > Use the QuickCalc
Calculator >

Create and Use Calculator Variables

The Variables area of QuickCalc stores calculator variables that you can access as needed. Calculator variables can either be constants or functions.

*calculator variables*. Calculator variables can either
be constants (coordinates/vectors, real numbers, and integers) or
functions. In the Variables area, you can

- Click a calculator variable to display information such as value, type, and description in the Details box at the bottom of the Variables area.
- Double-click a calculator variable to load it into the QuickCalc Input box.

Additional operations are available on the shortcut menus in the Variables area.

Create New Calculator Variables

You can create new calculator variables using the shortcut menus in the Variables area. When defining new calculator variables in the Variable Definition dialog box, the following rules apply:

*Constants.*Any expression entered in the Value or Expression text entry box is evaluated before the calculator variable is stored. Calculator variables that are defined as constants are available “globally.” You can access and use global constants in different drawings and sessions.*Functions.*Any expression entered in the Value or Expression text entry box is stored as text. Functions are evaluated when used in the QuickCalc Input box.

You can use one of the following methods to create global constants:

- Enter an expression in the Input box using the format
*$**variable_name**=**value*. For example, to define the golden ratio to 8 decimal places as a global constant called Phi, enter $Phi=1.61803399 in the Input box. - Click the New Variable button in the Variables area title bar. In the Variables Definition dialog box, click Constant and fill in the other boxes.
- Right-click the Variables area. Click New Variable.

You can access global constants and pass them to the Input box of the QuickCalc as follows:

- Double-click a variable in the Variables area of QuickCalc.
- Click a variable from the list of calculator variables, and click the Return Variable to Input Area button.
- Enter a dollar sign ($) followed by the variable name, and press ENTER.

*=$**variable_name* followed by pressing the END key. For
example, to use the previously mentioned global variable, Phi,
enter *=$Phi* and press the END key.

NoteIn QuickCalc,
only constants can be directly referred to by their global variable
names in the text or numeric entry boxes in windows and dialog
boxes.

CAL functions with the Endpoint Snap mode. The following table describes the predefined variables that are available in the Variables area of the calculator.

Several sample calculator variables have been predefined and stored in the Shortcut Functions category. These are geometric expressions that combineVariable |
Shortcut For |
Description |
---|---|---|

dee |
dist(end,end) |
Distance between two endpoints |

ille |
ill(end,end,end) |
Intersection of two lines defined by four endpoints |

mee |
(end+end)/2 |
Midpoint between two endpoints |

nee |
nor(end,end) |
Unit vector in the XY plane and normal to two endpoints |

rad |
rad |
Radius of a selected circle, arc, or polyline arc |

vee |
vee(end,end) |
Vector from two endpoints |

vee1 |
vec1(end,end) |
Unit vector from two endpoints |

CAL command.

You can easily modify these calculator variables or create your own. For more information, see theOrganize Variables into Categories

You can organize calculator variables in the Variables area under several categories. This results in a one-level tree structure. The Shortcut Functions category has already been created and contains several functions.

Use the shortcut menu in the Variables area to create, rename, or delete variable categories.