Tuesday, September 18, 2007

AUTOCAD Tips&Tricks

Application Interaction

Is there a limit on rows/columns from my OLE spreadsheet?

There is a limit, and that limitation is not necessarily AutoCAD's fault. To see a graphical example of this, select a large range in the spreadsheet, then look at the clipboard viewer. You will find the clipboard viewer in the accessories or system tools section of the Windows start menu. If you don't have this program you will need to use the Add/Remove Programs applet of the Windows Control Panel to add it. It will be in the System Tools section of the Windows Setup tab.

When you look at the clipboard viewer, you should see that the Windows clipboard has limited the data when presented in certain 'flavors'. When you use the ole link, you lose rows and/or columns.

If the link is not required, you may be able to get more of the data into AutoCAD by using the Paste Special option from the menu and choosing an option like 'AutoCAD Objects'.

Shaking the OLE from Excel Graphs

When you paste pie/bar graphs from Excel into AutoCAD, they can exhibit all the problems of a typical OLE insert, including plot rotation, etc. Use this procedure to 'shake off' the OLE.

  1. In Excel, copy your graph to the clipboard.
  2. In AutoCAD, issue the PASTESPEC command, choose Excel Chart, your only choice at this point.
  3. In AutoCAD, right click on the chart and choose CUT.
  4. In AutoCAD, issue the PASTESPEC command again, choose AutoCAD entities.
  5. Erase the outer border and background solid to reveal a good looking collection of native geometry

Block/Attribute

How do I control the prompt order for attributes?

When building the block definition, the selection order is the key. If you simply window off the geometry there is a good possibility the prompt order will not be as desired. When selecting objects for a block definition, first individually pick the attribute definitions individually in the order you want to be prompted, then select the rest of the geometry.

Importing Block Definitions

If you want to bring in only the definition of a block (such as a symbol on disk), you can use this little known trick. After issuing the insert command and selecting the file, press the ESC key at the first (insertion point) prompt. You will have the definition in the current drawing for latter use.

Construct/Draw

Inserting Drawings, Consider the BASE

When inserting blocks (or entire drawings) from a seperate DWG file, it may not come in 'attached' to the cursor, or in the right place. When preparing a drawing and its geometry to become 'insertable' into another drawing, you must consider its coordinates and then optionally the BASE variable. The preferred method for blocks is to move the geometry from the desired 'anchor' to coordinates of 0,0,0. If you don't want to do that, you should issue the BASE command and pick a point at the anchor.

Another problem scenario to watch out for is when the geometry has been moved to 0,0 and the current drawing had a base other than 0,0. In this case simply issue the BASE command and type in 0,0,0.

Some offset distances are greater than specified?

This can expecially occur when offsetting polylines. As the interior angle decreases, the distance between offset endpoints increases. However in parallel sections the perpendicular distance 'should' always be 100. For example with a 100 unit offset.

  • 135° interior angle = 108.35
  • 45° interior angle = 261.60

In general a more accurate representation of the offset would be achieved if you filleted the resulting polyline to 100, making most points along the path truly 100 units away, even in the 'bends'.

AutoCAD 2000 addresses this issue, see the OFFSETGAPTYPE system variable.

Why won't AutoCAD create my large array?

AutoCAD sets a default limit of 100,000 segments. If the quantity of rows * columns would exceed that, AutoCAD refuses to create the offset. However you can change the default value to any number from 100 to 10,000,000. To increase the value, enter the following at the command prompt. The example shows increasing the value to 50,000. Note that the name MaxArray is case sensitive and must be entered as shown.

Command: (setenv "MaxArray" "50000")

Relative Coordinates

Frequently in designating points in AutoCAD, you need to specify the relative position of the next point. There are several ways to do this:

Relative Cartesian: You simply specify the X/Y difference as positive or negative values. The following example indicates the next point is 12 units to the right (positive X) and 6 units down (negative Y). (Example)To Point: @12,-6

Relative Polar: You specify the distance and angle to the next point. The following example indicates the next point 15 units away at a 45 degree angle. (Example)To Point: @15<45

Relative Cylindrical: Much like relative polar except you have the ability to designate the amount of rise or drop at the new point. The following example indicates the next point 15 units away at a 45 degree angle, but also is 6 units lower. (Example)To Point: @15<45,-6

Relative Spherical:Much like relative cylindrical except the rise or drop is determined by an angle. The following example indicates the next point 15 horizontal units away at a 45 degree angle in plan view, but also lifts 12 degrees in the XY plane. (Example)To Point: @15<45<12

AutoCAD's Geometry Calculator

People often don't know about AutoCAD's built in geometry calculator. While it lacks in interface appeal it more than makes up for it in capability. Take the ability to snap to a point between to endpoints. Consider this example where a circle is placed halfway between the endpoints of two lines.

Command: CIRCLE
Specify center point for circle or [3P/2P/Ttr (tan tan radius)]: 'CAL
>> Expression: MEE
>> Select one endpoint for MEE:
>> Select another endpoint for MEE:

The key is when prompted for any point, enter 'CAL and type in the expression. In the case of MEE it knows you want endpoints and you don't have to use an object snap when picking. Also bear in mind that MEE is only one of dozens of expressions available at the prompt. Read your AutoCAD documentation on the Geometry Calculator for more.

How do I enter boundaries in bearing & distance?

First you need to set the appropriate units in the DDUNITS command. Set the angular units to 'Surveyor', then choose the direction button and make sure that 'Angle Direction' = east, 'Rotation' = counter clockwise. Even though you have set to Surveyors Units it won't work right unless set this way.

Then using the LINE or PLINE command you enter the calls as relative polar coordinates.

Command: LINE
Start Point: (Pick One)
Next Point: @123.45Next Point: @234.56

Notice the syntax for the relative polar coordinate. You put the @ sign first, which means relative to the last point. Next comes the distance. Last is the bearing. Its enclosed in the quadrant NE, NW, SE, SW, note the use of letter D to indicate the degrees.

The underutilized AutoCAD MULTIPLE command

When you need to repeat a command several times, consider the MULTIPLE command. At the command prompt type MULTIPLE followed by the command. Take the POINT command for example. Without the multiple prefix you would need to reissue the command before each pick location, now you can repeatedly pick the points until done.

Press ESC to cancel the repeating command.

Display

Why does AutoCAD regen every time I zoom or pan?

You may occasionally receive a drawing from an outside source that causes this problem. Simply type VIEWRES at the command prompt, say YES to fast zooms, and set your circle zoom percent to around 200.

Why won’t my linetypes display?

Sometimes it seems that no matter how you try, you can’t get line types with breaks to show the breaks. First thing to remember is that 3D polylines in AutoCAD cannot display a line type, nor can they have width or contain arcs for that matter. However, most other objects should if things are set right.

First check the value of LTSCALE, this master control variable determines the scaling of the gaps in linetypes. You may find this variable set to 1.0, which would not show breaks on a map. Enter LTSCALE at the command prompt and put in a value that is 50% to 66% of the scale at which you would plot the map. For example, if you would plot the drawing at 1”=50’, you should put in a value between 25-35 for LTSCALE.

If LTSCALE doesn’t set things straight, there is a possibility that your geometry has a CONTINUOUS linetype set to each object, in which case it won’t take on the linetype of the layer on which it is assigned. Simply issue the CHPROP command, select the geometry, type LT for linetype, and enter BYLAYER for the value.

If this still doesn’t display the linetype’s properly, you probably have polylines with vertices that are close together. To correct this use DDMODIFY, select the polyline, and turn on the LTGEN toggle in the dialog.

Why does the Object Properties Toolbar Stop Working?

When you pick objects at the command prompt, they highlight and grips appear. On the object properties toolbar the layer and/or color of the object usually appear so that you can change them. But on some systems this stops working. This is because the noun/verb selection has been turned off. Simply type DDSELECT at the command prompt and turn on the 'Noun/Verb Selection' toggle. The Object properties toolbar will start working again.

Number of Command Lines

When you press F2 and look back at the command history, you may notice that at some point it stops. The default number of lines is set to 400. On R14 you could change it in the preferences dialog. Unfortunately 2000 and higher has regressed. You have to use a to lisp expression setting like MaxHatch.

To check the current number of lines set:

Command: (getenv "CmdHistLines")

To set a new maximum number of lines:

Command: (setenv "CmdHistLines" "1000")

The number you use must be in a range from 25 to 2048!

Restoring a Lost Command Line

Sometimes users get in a hurry or just aren't careful, and can accidentally drag and drop the command line area, losing it in the process. Carefully follow this Registry Edit procedure to get it back.

  1. Shut down AutoCAD if it's running.
  2. Click on Start, then choose Run.
  3. Type REGEDIT and choose OK.
  4. On the left pane, double click on "HKEY_CURRENT_USER".
  5. Double click on "Software".
  6. Double click on "Autodesk".
  7. Double click on "AutoCAD".
  8. Double click on "R15.0"
  9. Double click on "ACAD-###:###".
  10. Double click on "Fixed Profile".
  11. Double click on "Command Line Windows".
  12. On the right pane, double click on "Dock Window Position".
  13. Several numbers should be highlighted, simply press "0".
  14. Choose OK, then close the Registry Editor.
  15. Restart AutoCAD, the command prompt should be back.

Hatches

Why won't AutoCAD create my dense hatch?

AutoCAD sets a default limit of 10000 segments. If the hatch that would be created would exceed that, AutoCAD refuses to create the hatch. However you can change the default value to any number from 100 to 10,000,000. To increase the value, enter the following at the command prompt. The example shows increasing the value to 100,000. Note that the name MaxHatch is case sensitive and must be entered as shown.

Command: (setenv "MaxHatch" "100000")

Images

How can I make working with IMAGES easier?

If you frequently insert images, having to position, scale and rotate them each time, try this simple trick. Begin a new 'empty' drawing. Insert the image, position, scale and rotate it into place. Make any other changes such as contrast, then save the drawing. From now on, simply insert the newly created drawing, not the image. The attached drawing will contain all the settings.

Interface

How can I balance right click behavior?

Starting with AutoCAD 2004, you can find a compromise between the old rightclick=enter, and the new rightclick=menu. A new 'time sensitive right click' gives you the best of both worlds.

When this is turned on, a quick click of the right mouse button is the same as pressing enter. Holding down the right mouse button longer than the specified time yields a context sensitive menu (when appropriate).

  1. Command: OPTIONS
  2. Choose the 'User Preferences' tab.
  3. Turn on 'Shortcut menus in drawing area'.
  4. Choose the 'Right-click Customization' button.
  5. Turn on 'Time Sensitive Right Click'.
  6. Change interval if desired.

Layers

Why isn’t my layer table sorted?

If you begin working with a large number of layers (around 200), you may notice that the layers are not sorted in the layer dialog. Instead they are shown in the order they were created. AutoCAD uses a system variable MAXSORT to control how many layers to sort on layer control as well as how many files to sort on file open. Simply type in MAXSORT at the command prompt and put in a numeric value larger than the default value of 200. This value is stored in the configuration files and won’t need to be reentered in your next drawing.

Don’t Plot That Layer!

A trick in AutoCAD that has been around for the longest time is a layer name that won’t plot regardless of its status. Create a layer in your drawing called DEFPOINTS. Use it to place notes to yourself, construction lines, etc. It also an excellent layer to put paper space viewports into, since the frames don’t plot.

No Xref Layer Filter

If you want your layer dialog to show only layers in the current drawing and exclude all xrefs, create a filter with a name like NOXREF, then put this in for the layer name "~*|*" (without the quotation marks).

No comments: