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) |
|