SolidWorks Express
CAD Tips for the week of December 6, 2010
 
Data Extraction - Edit Attributes: AutoCAD provides several options for editing the values of attributes in blocks inserted into a drawing >>
Data Extraction - Single-Line vs. Multiple-Line Attributes: When you create an attribute, one of the options in AutoCAD 2008 and up is to make the attribute have multiple lines >>
Rename With Wildcards: AutoCAD's Rename command lets you quickly change the names of a variety of objects: blocks, dimension styles, layers, and more >>
Mark Your Mistakes: The Undo command gives you quite a bit of control over the Undo process >>
Hatch Grips: AutoCAD 2010 introduced the ability to edit hatches using grips >>
   
 
> Data Extraction: Edit Attributes
   
 

AutoCAD provides several options for editing the values of attributes in blocks inserted into a drawing. Use whichever fits your work style the best.

  • Double-click when holding down the <Ctrl> key to summon the in-place editor. Note that if the attribute includes a hyperlink, the hyperlink will open instead of the in-place editor. If this happens, use a different editing method.
  • Double-click the block to display the Enhanced Attribute Editor.

Caption: Double-click a block to display the Enhanced Attribute Editor.

  • Select the block, then open the Properties palette. Change attribute values in the Attributes section.


Caption: Change values in the Attributes section of the Properties palette.

  • Type Attedit at the command line, then select the block. Change values in the Edit Attributes dialog box.


Caption: The Attedit command presents the Edit Attributes dialog box.

   
 
> Data Extraction: Single-Line vs. Multiple-Line Attributes
   
 

When you create an attribute, one of the options in AutoCAD 2008 and up is to make the attribute have multiple lines. Previous versions support single-line attributes only.


Caption: Option for Multiple lines appears in Mode section starting in AutoCAD 2008.

There are several differences between the two types, but the key point to remember is that if you save a drawing that contains multiple-line attributes to AutoCAD 2007 or earlier, those multiple-line attributes will convert to single-line attributes, one for every line of text in the original multiple-line attribute. If you reopen the drawing in a later release, the single-line attributes will be merged back into a multiple-line one.

Multiple-line attributes support more formatting options and space for input (single-line attributes are limited to 255 characters from the user interface). When they are saved to AutoCAD 2007, they may lose some of their formatting, and long lines of text may be truncated. AutoCAD will warn you if lines will be truncated and give you an opportunity to cancel.

Multiple-line attributes have four grips, just like an mtext object. Single-line attributes have only one grip.

   
 
> Rename With Wildcards
   
 

AutoCAD’s Rename command lets you quickly change the names of a variety of objects: blocks, dimension styles, layers, and more (see list under Named Objects in image below). To start the command, type Rename at the command line. Select the type of Named Object in the box at left. The Items box will list all instances of the objects in the drawing. Select an individual item, or use wildcards to change many items at once.


Caption: Rename dialog box. Type the * wildcard in the Old Name window to select all blocks.

Wildcards can be helpful when you need to make comprehensive changes. For example, if you need to add a prefix to block or layer names, type the * (asterisk) wildcard in the Old Name window to select all layer names. In the Rename To window, enter your desired prefix followed by *. For example, if you need to add the prefix 01- to all layer names, enter * in the Old Name window to select all layer names. Type 01-* in the Rename To window to add the prefix to all layer names (see image above).

Reverse the process to remove a prefix. In the Old Name window, enter the prefix followed by * (01-* in our example above). In the New Name window, type in only the * (see below).


Caption: Example of how to remove 01- prefix from all block names.

Note that AutoCAD won’t let you rename some things, like the Continuous linetype and Layer 0.

When using wildcards, you may want to save a backup copy of the drawing or use the Undo command to set a mark before you proceed (we’ll describe how to do this in the next tip).

Below is the list of wildcard characters supported by AutoCAD. Note that the wildcard searches are not case sensitive

# (pound)

Matches any numeric digit

@ (at)

Matches any alpha character

. (period)

Matches any nonalphanumeric character

* (asterisk)

Matches any string, including the null string

? (question mark)

Matches any single character

~ (tilde)

Matches anything but the pattern

[...]

Matches any one of the characters enclosed

[~...]

Matches any character not enclosed

- (hyphen)

Use inside brackets to specify a range for a single character

' (apostrophe)

Escapes special characters (reads the next character literally)

   
 
> Mark Your Mistakes
   
 

The Undo command gives you quite a bit of control over the Undo process. When you type Undo at the command line, you are prompted to

Enter the number of operations to undo or [Auto/Control/Begin/End/Mark/Back]:

Mark sets a mark in the information the Undo command is collecting. Once you set a mark, you continue working. If something goes horribly wrong, you can undo back to the mark you set by starting Undo and entering Back. If you undo one operation at a time, AutoCAD will let you know when you reach a mark. You can set as many marks as you like.

Note: If you select the Back option but don’t have any marks set, AutoCAD will undo everything in the current session.

When the Auto option is on, all actions of a single command are grouped. That means you can undo them all with a single Undo. Using this option may eliminate the need to mark when you’re not sure what the results of a specific command will be.

Note that both Mark and Auto are affected by the settings in the Control option. When you set None or One as the Control option, neither Mark nor Auto are possible and will disappear from the Undo options.

   
 
> Hatch Grips
   
 

AutoCAD 2010 introduced the ability to edit hatches using grips. If the grips that appear when you select a hatch to edit aren’t sufficient, you can add a new vertex. In AutoCAD 2010, click on a grip, then press <Ctrl> to add a new vertex. AutoCAD 2011 adds a new center grip that lets you manipulate hatch objects directly. Hover your cursor over the center grip to see your options. You can also right-click and select Add Vertex from the short-cut menu that appears.

   
 
   
 
 
>> SIGN UP for SolidWorks Express Newsletter and get the tips and tricks delivered into your inbox every two weeks!