Share
 
 

About Creating and Using Calculator Variables

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

You can use the Variables area to define, store, and retrieve 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.

Create Global Constants

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.

Access Global Constants

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.

To use a global constant in a text or numeric entry box in a window or dialog box, use the syntax: =$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.

Note:

In 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.

Use Shortcut Functions

Several sample calculator variables have been predefined and stored in the Shortcut Functions category. These are geometric expressions that combine CAL functions with the Endpoint Snap mode. The following table describes the predefined variables that are available in the Variables area of the calculator.

Variable

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

You can easily modify these calculator variables or create your own. For more information, see the CAL command.

Organize 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.

Was this information helpful?