The AutoCAD CAL Command

Do you ever use the transparent 'CAL command? It is probably one of those commands that you know, but use so infrequently that you forget about it. So why bother? How can it help? Here are some examples. Oh yeah, I'm not talking about the QuickCalc that runs in a palette - this post is strictly referring to the command line 'CAL command.

Example 1: Use it as a plain old calculator. At the command line, type ._CAL and enter an expression like 32/7 which will return 4.57142857. Okay, that was pretty easy and you didn't have to leave AutoCAD.

Example 2: So looking at example 1, what does 4.57142857 do for you? If you needed this answer as input to a command, I suppose you could copy and paste it in, but there is a better way. Suppose you want to draw a circle whose radius is 32/7. There is no need to use your handheld calculator or even run the 'CAL command first.

Just start the ._CIRCLE command and pick the center point. Now when you are prompted for the radius, 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: 32/7
Resuming CIRCLE command.
Specify radius of circle or [Diameter] <112.848>: 4.57142857
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 + 12.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)+12.5
>>>> Enter a point:
>>>> Enter a point:
Resuming CIRCLE command.
Specify radius of circle or [Diameter] <242.440>: 21.1804714
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 is a bunch of steps no matter how you slice 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.

Of course the syntax in examples 3 and 4 is not easy to remember, but if you do things like this frequently, set up a toolbar or ribbon button with the proper syntax, or go the old fashioned way and use a post-it note on the monitor.

These are just a few ways to use the 'CAL command. There are many, many more uses. Check out the AutoCAD help on this command.

 


All content is copyright © CAD PANACEA 2005-2013 unless otherwise noted and may not be reproduced. All comments posted to this blog are the sole responsibility of the person making the comment.

Google, as a third party vendor, uses cookies to serve ads on this site. Google's use of their cookies enables it to serve ads to users based on their visit to your sites and other sites on the Internet. You may opt out of the use of these cookies by visiting the Google ad and content network privacy policy.

Powered by Drupal