[Search tip detail and code files using keywords, tip number, author name, etc ]
Calculate in a Command
Tip# 3239 By Brian Gustafson On 26-Jul-2009
Rated By 2 users
Categories : 2D Operations
Software type : AutoCAD 2010
Rename File To : No Files to download.
This tip is to offset an object and calculate a distance that it is offset.

Brian Gustafson sends a method for performing arithmetic calculations within an AutoCAD command for numeric values. "This tip is to offset an object and calculate a distance that it is offset. I use it to offset a line, mostly, such as a centerline of a shaft to create the o.d. of a feature. For example, enter offset on the Command line type ‘Cal, enter .5/2, then press Enter. Select the line you want to offset and select which side you want the line to show. Select the line again and pick the opposite side. This will create a line .25 on each side of a centerline.

"This also works if you want to convert to metric or vice versa. You can do multiple calculations, for example, 1/2*25.4. This will offset a line 12.7 from the object line."

Brian created an icon with the following macro:

^C^Coffset ‘cal

Works on AutoCAD versions since release 9.
Notes from Cadalyst Tip Patrol: The ‘Cal function also works for other commands. You can use it when drawing a line or for the radius of a circle. It should work for any command that requires a numeric input. This can save a lot of time in many circumstances. At times I encountered a numeric overload error; if this happens to you, just do it again. Sometimes I had to cancel the command and completely start over. If you need to divide a whole number by another whole number (essentially a fraction) then you don’t have to use the ‘Cal function.


Average Rating:

User comments
Comment by Miller,Richard
Posted on 2009-07-28 06:17:39
I have been using a calculator for those fractions containing decimal numbers. This will help re-keying large numbers (always like to be as precise as possible).

Log In