Categories

AutoCAD 2015 and AutoCAD LT 2015 Bible

The most comprehensive AutoCAD book around!

Ending the LINE command quickly

Prior to AutoCAD 2000 you could end the LINE command by right-clicking with your mouse. That was because the right mouse button was programmed to be equivalent to pressing Enter. However, starting in AutoCAD 2000, right-clicking opens up a shortcut menu. One of the options on that menu is Enter which you can click to end the LINE command, but who wants to take that extra step? You use the LINE command so often, at least it should be easy. Here are three very different approaches to solving this annoyance:

  1. De-activate the shortcut menus. Start the OPTIONS command and choose the User Preferences tab. Then click Right-click Customization. You can then make several choices from the dialog box. Dean Urevig suggests the following settings: Default Mode-Repeat Last Command. Edit Mode-Shortcut Menu. Command Mode-Enter. However, this approach gets rid of all your shortcut menus except when you are editing a selected object. I still like to use the shortcut menus for choosing command options. So you may want to try one of the other approaches. Glen Beech suggests checking the Turn On Time-Sensitive Right-Click check box. This makes a quick right-click equivalent to pressing Enter, and a longer right-click displays the shortcut menu. Then keep the other defaults.
  2. Create a one line ribbon button. Many of the lines you draw are drawn one line at a time. You can create a ribbon button that automatically ends the LINE command after you draw one line. The menu item will read: ^C^C_line;\\; For more information on creating a custom ribbon button, see “Tutorial: Add Add a button to the ribbon in AutoCAD.”  I love this option; if you create this button, I predict that you’ll use it a lot.
  3. Is your mouse several inches away from your keyboard? Or even at a different height? If you can place it next to the keyboard, you can just reach over with your thumb and press Enter on the numeric pad to end the LINE command. Vicki S. Mangum and Kyle Pettibone both suggested using your left hand to hit the spacebar. Your left hand is free and the spacebar is big! Marvin Henrie uses the Escape key. Thanks for these tips!

If you have a three-button mouse, you can customize its buttons. Then you can use the third button as an Enter button.

Tutorials:Dimension in paper space

Dimensioning in paper space has several advantages:

  • You don’t have to worry about the size of the dimension arrowheads, text, etc. Everything is full size and you plot at 1:1 scale.
  • You can place the dimensions outside the border of the viewport, giving you more room.
  • You can easily dimension some parts of the model in one viewport and other parts in another. You don’t have to create separate layers and freeze some of them.
  • If you have a 3D model, you’ll be showing it at different angles in the viewports and you can dimension appropriately. It’s almost impossible to properly dimension a 3D object in model space.

If you’ve been dimensioning in model space, give it a try. Here are the steps:

  • If you haven’t already done so, create a text style.
  • Create a dimension style in the Dimension Style Manager.
  • On the Fit tab, choose the Scale Dimension to Layout option.
  • Create a layer for your dimensions in paper space.

The Trans-Spatial dimensioning feature (since Release 2002) automatically adjusts dimension measurements for the scale of the viewport. You can just go to your layout and dimension as you would in model space.

If you move the viewport, or pan the view, use DIMREGEN to get your dimension back to its proper location. Occasionally, you may need to use DIMREASSOCIATE to reassociate the dimensions to their objects.

Tutorial: Create an architectural dimension style

Are you getting the look you need for your dimensions? Are you constantly making little adjustments? If dimensions aren’t your friend, you need to get more comfortable with dimension styles.

In this tutorial, you create an architectural dimension style. Why? Because the default style is a mechanical look and by changing it to architectural, you’ll get a chance to work with many of the dimension style features.

Note: The values that I chose in this tutorial are my choices. They don’t come from any standard; you should follow the standards in your office or discipline.

Follow these steps:

Open any architectural drawing. If you don’t have one, open a new drawing and choose Format > Units. Change the units to architectural. Draw a rectangle 40′ wide by 30′ high and zoom to its extents. Zoom out a little more so you have room for your dimensions.

If you’re starting with a new drawing, create a new layer, named dim and make it a different color from your rectangle. Set it current. Make sure that OSNAP is on with a running object snap for endpoints.

Choose Dimension > Dimension Style or click Dimension Style on the Dimension toolbar to open the Dimension Style Manager.

Click New. In the Create New Dimension Style dialog box, enter arch_96 and click Continue. The 96 refers to the scale that we’ll use later.

Note: We won’t use it now, but click the Use For drop-down list. You can see that you can create a style that applies only to a certain type of dimension. For example, you may want angular dimensions to have open arrows but the rest of your dimensions to use architectural ticks. So you could create a dimension style just for angular dimensions.

Click Continue.

The New Dimension Style: arch_96 dialog box opens. Click the Lines tab.

Note: In the Dimension Lines section, you can make the dimension line’s color, linetype, and ineweight different from the rest of the dimension. We’ll leave it the same, which is more typical.

Note that the Extend Beyond Ticks box is grayed out. That’s because you don’t have architectural ticks (and I hope you don’t have any other kind either). To create the ticks, click the Symbols and Arrows tab. In the Arrowheads section, choose Architectural tick from the First drop-down list. The Second drop-down list follows suit automatically. Choose Open from the Leader drop-down list. The arrow size should be 3/16″.

Click the Lines tab again. Set the Extend Beyond Ticks value to 1/16″.

Leave the Baseline Spacing value at 3/8″. This is the spacing between the dimension lines of two baseline dimensions.

Note: You can suppress the first or second dimension line. These are the lines to the left or right of the text. As you’ll see later, architectural dimensions only have one dimension line, so this doesn’t apply to us.

In the Extension Lines section, you can change the color, linetype, and lineweight of the extension lines. We’ll leave them unchanged.

Note: You can also suppress the first or second extension line. Normally, you would do this only for a special situation where an extension line doesn’t fit well. You would create an override to a dimension style for this purpose. (That’s for another tip!)

Change the Extend Beyond Dim Lines value to 1/8″. This is the amount that the extension lines extend beyond the dimension lines.

Change the Offset from Origin value to 1/8″. This is the distance from the object you’re dimensions to the extension line.

Click the Symbols and Arrows tab, just to see what’s there. (Before Release 2006, you’ll have one tab called Lines and Arrows.) You’ve already change the arrowhead. The rest of this tab is for center marks, arcs, and radial dimensions, which don’t concern us, so click the Text tab.

The first step is to choose a text style. If you don’t already have one, you can create it now. Click the Ellipsis button to the right of the Text Style drop-down list.

In the Text Style dialog box, click New. Name the style dimtext_96 and click OK.

In the Text Style dialog box, choose a font from the Font Name drop-down list. Architects like a font that looks hand-drawn. I chose Stylus BT. If you don’t have that on your system, choose another one. The important point is to keep the Height at 0′-0″ because that allows the height in the dimension style to take precedence. Click Apply and click Close.

Back in the New Dimension Style: arch_96 dialog box, choose dimtext_96 from the Text Style drop-down list. You can change the color of the text and also place a fill box around the text (for legibility over other objects), but we’ll leave these the same. The text height should be 3/16″. Note that the Fraction Height Scale text box is grayed out. We’ll come back to that later.

In the Text Placement section, choose Above from the Vertical drop-down list.

In the Text Alignment section, choose Aligned with Dimension Line. Notice how the preview changes dramatically and starts to look like an architectural dimension.

Click the Fit tab. This tab specifies how lines and arrows fit, especially if there isn’t enough room. You also set the scale here.

In the Text Placement section, choose Over Dimension Line, with Leader.

In the Fine Tuning section, check the Draw Dim Line Between Ext Lines so that even if the text can’t fit between the extension lines, there’s still a dimension line.

In the Scale for Dimensions section, change the scale to 96. Of course, this value depends on the size of your model and the size of the paper you’ll be using. You would use the Scale Dimension to Layout option for dimensioning in paper space on a layout. See my tip Dimension in paper space.

Click the Primary Units tab. From the Unit Format drop-down list, choose Architectural. Leave the precision as 1/16″.

From the Fraction Format drop-down list, choose Diagonal.

In the Zero Suppression section, uncheck the 0 Inches check box to show 0 inches.

Now click the Text tab and change the Fraction Height Scale value to .75. (You can’t do this until you’ve specified a unit format that uses fractions.

If you want to include alternate units, such as metric (if you’re main units are Imperial), use the Alternate Units tab.

Click OK.

In the Dimension Style Manager, with arch_96 selected, click Set Current and click Close. You’re now ready to dimension.

Choose Dimension > Linear or click Linear on the Dimension toolbar. Press Enter so you can select an object. Pick any side of the rectangle (or any object in your pre-existing drawing, if you opened one). Specify a location for the dimension line, leaving room for the text.

Happy dimensioning!

Tutorial: Automate annotation scaling with annotative objects

Since AutoCAD 2008, you can automate the sizing of annotation, such as text and dimensions, in multiple viewports with varying scales. In this tutorial, you practice using this feature, called annotative objects.

The following objects can be annotative, meaning that they can size automatically:

  • Text (single-line text)
  • Mtext (multi-line text)
  • Dimensions
  • Multileaders (which are new for AutoCAD 2008)
  • Tolerances (in frames)
  • Hatches
  • Blocks
  • Block attributes

Note that objects that use styles — text, dimensions, and multileaders — require an annotative style as well.

In this tutorial, to keep things simple, we’ll just dimension the following drawing, which I extracted from AutoCAD’s sample drawing (in the Samples folder) db-samp.dwg.

Follow these steps:

    1. Click a layout tab, or the layout button on the status bar.
    2. Choose View tab>Viewports panel> New (or View > Viewports, the VPORTS command) and insert the viewports that you want. If possible, decide which scales you will use before adding annotative objects.
    3. Select a viewport and set its scale in the Standard Scale item of the Properties palette. Do the same for each other viewport. Here I have two viewports: the left is 1/4″ = 1’0″ (1:48) and the right is 1/2″ = 1’0″ (1:24). At the same time, check that the Annotation Scale value (shown in the Properties palette) is the same as the Standard Scale; if not, change it so that the two values are the same.
    4. Return to the Model tab.
    5. Choose Annotate tab> Dimensions panel and click the dialog box launcher at the right of the tab (Dimension> Dimension Style, the DIMSTYLE command). Choose the dimension style you want to work with and click Modify. Or, click New, and create a new dimension style. Either way, on the Fit tab, check the Annotative check box. Click OK. Notice that your style now has the annotative icon next to it. Click Set Current and then click Close.
    6. At this point, you should think a bit about which dimensions you’ll want in which viewport, but you can make changes later.
    7. Switch to a dimension layer. Choose Annotate tab> Dimensions panel> Dimension drop-down>Linear (Dimension> Linear Dimension, the DIMLINEAR command). If this is the first annotative object you’ve created in the drawing, you’ll see this dialog box, reminding you to set the scale. Click the drop-down list and choose a scale for one of the viewports that will show this dimension. I chose 1/4″ = 1’0″ because this dimension will go in the left viewport which is at that scale. Click OK.
    8. Place the dimension. Note that the annotation scale on the right side of the status bar shows the scale that you chose. You can change the scale at this time. If you place other dimensions, they will also be at the same scale.
    9. To place a dimension that will be visible at a different scale, such as for our right-hand viewport, choose the scale from the Annotation Scale list on the status bar.
    10. For a dimension that will appear in more than one viewport, place it at any of the scales, then select it, right-click it, and choose Annotative Object Scale> Add/Delete Scales. In the Annotation Object Scale dialog box, click Add. Choose the new scale and click OK. Click OK again to return to your drawing. Use the same procedure to remove or change annotation scales for objects.

Note: If you hover the cursor over the dimension, you’ll see that it now shows a double annotation icon, indicating that the dimension has more than one scale.

That’s it! Just display the layout and you’ll see that the dimensions are all the same size. Even dimensions that show in both viewports, at more than one scale, are the right size in both viewports.

In this drawing, you can see that one of the dimensions of the desk (7′-1 11/16″) doesn’t appear in the left viewport. That’s because it doesn’t have the 1/4″=1’0″ scale. But the 6′ dimension has both scales, so it appears in both viewports.

The many ways to import text

If you have some text in another location and need it in your AutoCAD drawing, you certainly don’t want to retype it. There are several ways to import text from other documents into your drawing.

The Multiline Text Editor

Save the text as a text (.txt) or Rich Text Format (.rtf) file. (You do that in your word processor by choosing File>Save As and choosing one of those formats from the Save as Type drop down box. Rich Text Format keeps a good deal of the text formatting.) Choose Multiline Text from the Draw toolbar to open the Multiline Text Editor. With the Character tab on top, click Import Text and find your file in the Open dialog box. Click Open. You can now format the text using the Multiline Text Editor’s tools, a nice advantage.

Mike Tuersley of Technical Software, Inc. sent in this addition: this method has a size limit (16K). Instead, you can copy the text to the clipboard from the other file and return to AutoCAD. In the Multiline Text Editor, right click and choose Paste. This bypasses the file< size limitation.

Rick Martindale of Adams Consulting Engineers, Inc. offered another way to import text: “When you want to copy and paste (from Word, etc), if you use the “Paste Special” option in AutoCAD, you get a dialog box that allows several options as to what type of object will be created. If you choose TEXT, the information from the clipboard is inserted as MTEXT, and is now fully editable. No embedded object to worry about, and the original text does not have to be RTF.” You’ll find Paste Special on the Edit menu.

Drag-and-Drop

If you have a text or RTF file that you want to import, you can simply drag it in from >Windows Explorer. Open Explorer and locate the file. Position/size the Explorer window so you can also see your drawing. Click the file and drag it into your drawing, then release the mouse button. If you later wish to format it differently, choose Modify>Text, select the text and format it in the Multiline Text Editor which opens.

Copy and Paste

Let’s say you want to import part of a file, even just a few words. You can open the file, select the text, copy it to the clipboard, and then return to AutoCAD. Now click Paste on the Standard toolbar. AutoCAD opens the OLE properties dialog box, where you can specify size, scale, plot quality and so on. Click OK and AutoCAD pastes in the text with the original formatting intact. This is an embedded object. You can’t edit this in the Multiline Text Editor, but you might not need to.

Insert Object

This method also creates an embedded object. Follow these steps:

  1. Choose Insert>Object. This is the same as the INSERTOBJ command.
  2. Choose Create From File.
  3. Click Browse, find the file and click Insert. You can now choose Link to link the data in your drawing to the original file, if you want it to be updated each time you open or plot your drawing.
  4. Click OK.

Which method do you use most often and why? Or do you have another method? Leave a comment!

Changing the MText string to your login name

Since AutoCAD 2004, there’s a system variable, MTJIGSTRING, that creates some sample text when you start the MTEXT command. The idea is to help you gauge the size of the text before you create it, so you can change the height if you want. Lambertus Oosterveen sent me this line that you can put in your acaddoc.lsp or acad.lsp file:

(setvar “mtjigstring” (strcase (getvar “loginname”)))

It sets the text to your login name, making it all uppercase. I actually like having upper and lower case text, so I used the following simpler code:

(setvar “mtjigstring” (getvar “loginname”))

Here’s the result:

MTJIGSTRING has a maximum of 10 characters. (It works better when you have a short name!)

Quickly format dimensions

Usually, it’s best to format your dimensions using a dimension style. If you want an exception to the style, create an override. To create an override, choose Dimension > Dimension Style and click the Override button in the Dimension Style Manager. This method is the best way to maintain your CAD standards.

But sometimes, you may want a quick and dirty way to change a dimension. If so, the quickest way is through the shortcut menu. Draw the dimension using the desired style and then select it. Now, right-click to display this shortcut menu:

You can use the following four items to format your dimensions:

  • Dim Text Position: Choose to put the text above the dimension line, to center it, to move it back to the default position (“Home”), to move just the text, to move the text with a leader, and to move the text and the dimension line at one time.
  • Precision: Quickly choose from 0 to 6 decimal places
  • Dim Style: Create a new style from the selected dimension. For example, if you changed the dimension text position, you can save a new style and use that for other dimensions.
  • Flip Arrow: Flips the selected arrow to the outside of the extension lines, as you see here — the bottom arrow of the 0.5000 dimension is flipped to the outside.

How to print a list of text styles

You might also want to print out a list of your text styles. (You can also check for text styles using the CHECKSTANDARDS command.) The procedure is similar to creating a layer list:

  1. At the command line, type -style.
  2. At the Enter name of text style or [?] <STANDARD>: prompt, type ? (a question mark) and press Enter.
  3. At the Enter text style(s) to list <*>: prompt, press Enter.
    The AutoCAD Text window opens with a list of your text styles and their properties.
  4. Select the entire list and copy it to the clipboard. (Ctrl+C).
  5. Open any word processor or text editor and paste the list into a new document (Ctrl+V).
  6. Print the list.

How to print a list of dimension styles

A list of dimension styles is helpful. The plain list doesn’t list the properties of each dimension style, because each style has so many system variables. You can list the settings of any individual style, though. But you can do even better; you can list compare the settings of two dimension styles. Comparing dimension styles is great for troubleshooting dimensions.

To create a simple list:

  1. At the command line, type -dimstyle.
  2. At the prompt, type ? (a question mark).
  3. At the Enter dimension style(s) to list <*>: prompt, press Enter.
    The AutoCAD Text window opens with a list of your dimension styles.
  4. Select the list and copy it to the clipboard. (Ctrl+C).
  5. Open any word processor or text editor and paste the list into a new document (Ctrl+V).
  6. Print the list.

To list the settings of any individual dimension style, here’s the procedure:

  1. Type -dimstyle on the command line.
  2. At the prompt, type v to start the Variables option.
  3. At the Enter a dimension style name, [?] or <select dimension>: prompt, type the name of the dimension. (If you don’t know the name, type ? to get a list first. If you want the current dimension style, you can use the STatus option.)
    The AutoCAD Text window opens with a list of all the system variable settings for the dimension style you chose.
  4. This is a LONG list. To select the list, scroll up to its beginning and click the mouse there to place the insertion point. Scroll to the bottom of the list. Press Shift and click at the end. The entire list should now be highlighted. Copy it to the clipboard. (Ctrl+C).
  5. Open any word processor or text editor and paste the list into a new document (Ctrl+V).
  6. Print the list.

To compare the settings of two dimension styles:

  1. From the menu, choose Dimension>Style.
  2. Click Compare.
  3. In the Compare Dimension Styles dialog box, choose the two dimension styles in the Compare and With drop-down lists.
  4. The list is displayed in the dialog box. It shows only the differences between the two dimensions, not all the settings.
  5. Now here’s the secret. At the upper-right corner of the list is a button that looks like the Copy to Clipboard button on the Standard toolbar: Click this button to copy the list to the Windows clipboard.
  6. Open any word processor or text editor and paste the list into a new document (Ctrl+V).
  7. Print the list. (In Microsoft Word, choose Table>Convert>Text to Table to create a nice table.)

Precisely control the size of OLE text and objects

When you paste content from another application into an AutoCAD drawing, the OLE Text Size dialog box opens.

AutoCAD picks up the font and point size and lets you convert text to your drawing’s units. Change the value in the Text Height box and click OK. AutoCAD adjusts the size of the text.

You can change the text size later, as well. Select an OLE (pasted) object and right-click it. Choose OLE > Text Size to open the same dialog box.

Interestingly enough, this technique works to scale all objects, including images that are not text.

Unfortunately, the exact results are difficult to predict. Here, you see the word “Client” to the left, created with the MTEXT command at .2 units. To the right, you see an OLE object set to .2 units. You can see that the OLE text size is not accurate.

Nevertheless, you can use the OLE Text Size text box to get approximate results quickly, without having to do any calculations.