Back

Controlling Your Calculations in AutoCAD

AutoCAD® and AutoCAD® Civil 3D® have a calculator built right into the programs, yet many people I talk to do not use the full functionality of these tools. The CAL and QuickCalc calculators use geometric functions, unit conversions, and variables in addition to the basic features found in scientific calculators. You can use both calculators transparently from commands and from the Properties palette to obtain geometric information.

QuickCalc (Figure 1) can be used as an expression builder as well. You can compose an expression that can be easily edited and when you are finished, click the equal sign (=) or press Enter. Later, you can retrieve the expression from the History area, modify it, and recalculate the results.

Figure 1

Let’s explore the CAL and QuickCalc commands and what they can do for you not just as calculators, but also as tools to keep your drawings’ calculations accurate.

The CAL Command

At the Command prompt, enter CAL. Then, enter a CAL expression as shown and the result can be displayed as shown in  Figure 2.

Figure 2 

You can also use the CAL command transparently by preceding the input with an apostrophe (‘) after the command. The example (Figure 3) shows the circle command started then the transparent cal command with an expression, which will result in a circle with a radius of 7.

Figure 3

Converting Between Units with CAL

For general conversions, use CAL’s cvunit function. This will convert amounts in one unit to the equivalent amount in the second unit.  The formula of this function is as follows:

Cvunit(amount,firstUnit,secondUnti)

See Figure 4 for how this would look on the command line converting feet to meters from the Cal command.

Figure 4

The Quick Calculator

You can access QuickCalc directly in the following ways:

  • On the ribbon, Home tab, Utilities panel, QuickCalc button (Figure 5).

Figure 5

  • On  the menu bar, Tools, Palettes, choose QuickCalc (if you do not show the menu set the menubar system variable to 1 to display the menu). See Figure 6.

Figure 6

  • On the Standard toolbar, click the QuickCalc button.
  • In the drawing area with no command active, right-click and choose QuickCalc (Figure 7).

Figure 7

Figure 8

Figure 8: From left to right the commands are as follows:

  • Clear: Clears the Input box.
  • Clear History: Clears the history area.
  • Get Coordinates: This will take you back out to the AutoCAD window where you can capture the coordinates from your drawing. Those coordinates will be pasted into the calculator window.
  •  Distance Between Two Points: Calculates the distance between two points. The calculated distance always displays as a unitless decimal value.
  • Angle of Line Defined by Two Points: Calculates the angle of two points.
  • Two Lines Defined by Four Points: Calculates the intersection of four points.

Converting Units of Geometry with QuickCalc

To convert units using QuickCalc, simply expand Units Conversion tab on the Calculator palette. Select the type of unit you want to convert from the Units type field, then select the unit you want to convert, and in next field enter the unit in which you want it to be converted.

  1. Draw a circle and give it a diameter of 6 units (ft.) We will be using 1 unit to represent 1 foot. Type CTRL+1 and open the Properties palette and pull down the Geometry section as shown in Figure 9.
  2. The diameter of the circle is shown as 6.  You can change the value of this directly and the change will be reflected on your drawing.
  3. Select the Calculator at the right of the diameter to bring up the QuickCalc.

Figure 9

     4. Under the Units Conversion section, change the Units type to Area. Change the “Convert from” and “Convert to” sections to your desired outcome and the converted value will be            shown for you to use in your calculations (Figure 10).

Figure 10

This is a good way to use the QuickCalc Transparently from the Properties palette. Click any box in the Properties palette that contains a numeric value, then click the QuickCalc button that appears in the box.  In this section we clicked on the diameter of the circle. We can select any of the items that are not greyed out to use the calculator (Figure 11).

After calculating a value, transfer the result to the Properties palette by clicking the Apply button.

If the Apply button is grayed out, it means that the specified property cannot be changed directly.

Figure 11

Launching the Windows Calculator from AutoCAD

Do you still prefer to use the windows calculator?  You can do that by editing the ACAD.PGP file. On the Express Tools tab under the Tools panel, select Command Aliases as shown in Figure 12.

Figure 12

  1. Move over to the Shell commands tab.
  2. Select Add.
  3. Add the information as shown in Figure 13.
  4. Type WC at the command prompt in AutoCAD.
  5. The Windows Calculator will be displayed.

Figure 13

Use QuickCalc Transparently Within a Command

During a command, you can access QuickCalc transparently in the following ways:

  • Right-click to display the shortcut menu and choose QuickCalc (Figure 14).

Figure 14

  • At a prompt for a value or coordinates, enter 'quickcalc or 'qc.

For example, while creating a circle, enter an expression in QuickCalc to the next point prompt and click the Apply button. The next point of the circle uses the results, which might be a diameter or radius. Test out by applying simple functions like 2*3.

RPN Calculator in Civil 3D

Have you ever wanted to use that older reverse polish notation calculator you had many years ago? Well you can in Civil 3D (but not AutoCAD).  Type RPNCALC at the command prompt and your calculator will be displayed as shown in Figure 15.

Figure 15

Conclusion

The CAL and QuickCalc functions are examples of how you can make AutoCAD work for you. You can use both to perform calculations on geometry to provide accurate results. The QuickCalc is always a right-click away to help you calculate an accurate result for your project and the CAL command can be accessed from the command line.

Sam Lucido is a CAD Services Manager with Haley and Aldrich, Inc. He has more than 25 years of experience involving design, user support, and customization. Sam is an Autodesk Expert Elite Member and on the Board of Directors for AUGI, Inc. He uses his knowledge about AutoCAD and Civil 3D to help provide support to engineering and design teams with monthly tip sheets and online training. You can find him at CADProTips.com and he can also be reached at lucido1373@gmail.com.

Appears in these Categories

Back