Here's old oldie, but a goodie...

Most users of AutoCAD 2006 and above know about the 'new' QuickCalc command, the built in calculator, but many users don't know that AutoCAD has had a built-in calculator since R12. It's command line based, but very powerful.

You can use it alone or within an active command. I still prefer the old command line version over the new QuickCalc. Here are some examples.

**Example 1:** Use it as a plain old calculator. At the command line, type ._CAL and enter an expression like 95/7 which will return 13.571428571429

**Example 2:** In this example, we are going to apply the result of a calculation directly to a input prompt. Suppose you want to draw a circle whose radius is 99.03 + 74.33 + 69.08. You might reach for your HP handheld and add these up, then draw your circle, but you can do this right inside of the ._CIRCLE command instead.

Start the ._CIRCLE command, pick the center point. Now you are prompted for the radius, so enter 'CAL, then the equation. The result is calculated and the circle is constructed.

Command: ._CIRCLE

Specify center point for circle or [3P/2P/Ttr (tan tan radius)]:

Specify radius of circle or [Diameter] <112.848>: 'cal

>>>> Expression: **99.03+74.33+69.08**

Resuming CIRCLE command.

Specify radius of circle or [Diameter] <112.848>: 242.44

Command:

**Example 3:** This is similar to example 2, except we are going to get one of the distances from the drawing itself. This time the circle radius is specified by two points in the drawing + 150.5.

Start the ._CIRCLE command, pick the center point. Again, you are prompted for the radius, so enter 'CAL, then the equation. The result is calculated and the circle is constructed. In this example "cur" is part of the equation used to tell AutoCAD that you are going to pick a point on the screen.

Command: ._CIRCLE

Specify center point for circle or [3P/2P/Ttr (tan tan radius)]:

Specify radius of circle or [Diameter] <242.440>: 'CAL

>>>> Expression: **dist(cur,cur)+150.5**

>>>> Enter a point:

>>>> Enter a point:

Resuming CIRCLE command.

Specify radius of circle or [Diameter] <242.440>: 766.99064463655

Command:

**Example 4:** Suppose you have a line that's 99 units long, and you want to place a circle on the line whose center is 1/3 the distance of the line away from an endpoint of the line. Simple math tells you to place the center of the circle 33 units from the line endpoint.

But what if the line's length is unknown and you want to place a circle 2/9ths from one endpoint? This is a little more involved.

You might...

- Change the units precision to the maximum
- List the line.
- Write down the answer.
- Change the units back.
- Take the answer, enter it into your handheld HP.
- Multiply by 2/9.
- Draw a construction line from the line endpoint this distance along the line.
- Start the circle command at this endpoint.
- Erase the construction line.

...or you could...

- Use the ._DIVIDE command
- Divide the line into 9
- Set PDMODE to something like 32 so you can see the newly created points.
- Draw your circle
- Erase the 8 POINT objects that were created by the ._DIVIDE command.
- Restore PDMODE

That's nine or six steps, depending on how you do it.

Here are the steps using the built-in calculator.

Command: ._CIRCLE

Specify center point for circle or [3P/2P/Ttr (tan tan radius)]: 'CAL

>>>> Expression: **plt(end,end,2/9)**

>>>> Select entity for END snap:

>>>> Select entity for END snap:

Resuming CIRCLE command.

Specify center point for circle or [3P/2P/Ttr (tan tan radius)]:

3018809.0299135,1320280.6000424,0

Specify radius of circle or [Diameter] <766.991>:

Command:

Notice that this time, a coordinate was returned instead of a number.

So this was a bit shorter than the other two ways, and we didn't have to make any temporary lines or points.

In this example the "plt" function was used. "plt" is a built-in function that accepts two points that define a line, and a third parameter which specifies a parametric position along the line. I used "end" to specify the line endpoints, this works like the "endp" object snap to return the endpoint of a selected line. We could have used "cur", which would have accepted any picked point, but you would have to specify the "endp" of the line yourself.

This is just a few ways to use the CAL command. There are many, many more uses.

Tell me your favorite.

Labels: Tips

PermaLink Posted 1/10/2007 08:56:00 PM