Ren Smith sends us an AutoCAD tip for adding prefixes to Layer names — or removing them.
"I was looking for a way to add or remove a prefix to all layer names, but all I found were LISP routines for adding a prefix, not removing one. Before trying to write my own LISP routine I started playing with the Rename command, which brings up a dialog box to rename just about anything you want. I found that by using wildcards, you can rename everything, or just specific names, all at once.
"For example, in the Old Name box, add the wildcard * to select all names, and in the New Name box, enter a MC2-* (where MC2- is the prefix) and select Rename. Wow! All layer names now have a MC2- prefix.
"And it gets even better: You can use the same technique to remove a prefix. For example, In the Old Name box, add the wildcard MC2-* to select all names that start only with MC2- and in the New Name box enter just the * and select Rename.
"Now if you're thinking what I'm thinking, the answer is yes — it works on Block names, Dimension Style names, and all the other options in the Rename dialog window."
Notes from Cadalyst Tip Patrol: The Rename tool is a great feature in AutoCAD. It allows users to give new names to many objects and styles. Type Rename on the Command line to bring up the Rename dialog box. There are several types of Named Object categories: Blocks, Dimension Styles, Layers, Linetypes, and more. Select the type of Named Object you want to rename; this will bring up a list of the objects of that type in the file you are working on. Choose an object to rename it, or to rename multiple objects at once, use wildcards.