[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Rename Layers from Bound Xrefs
Tip# 3260 By R.T. Rinehart On 13-Sep-2009
2.666665
Rated By 3 users
Categories : Layer Properties
Software type : AutoCAD 2010
Rename File To : No Files to download.
With the help of the Rename command, users can change the names of multiple layers in a drawing.

R.T. Rinehart often needs to change the names of several layers in a drawing. He has developed a process using the Rename command for use when the names have similar beginnings.

"When an xref is attached to a drawing, AutoCAD delineates its layers in the layer manager by placing the reference name followed by a vertical bar, followed by the layer name (e.g., floorplan|steel, or floorplan|concrete). When you bind these references, AutoCAD replaces the vertical bar with a $ or 0 or $0$ (e.g., floorplan$0steel, floorplan$0$concrete). This can lead to a very confusing layer dialog, so I always use the Rename command and wildcards to clean it up. Simply go to the Rename command, click Layers, and then click on one of the offending layer names.

"Place an asterisk right before the text you want to keep in the Old Name field (floorplan|steel becomes floorplan|*steel). Then press enter and enter an asterisk (*) in the Rename To field. This will automatically rename all layers that start with that text to the correct name. In our example, floorplan$0$steel would just become steel. This is a quick way to get rid of all those pesky bound xref layer names that are so confusing. Of course, if you bind the xref using the bind type as insert, those pesky names wouldn't be there to start with, but often I get a drawing that is loaded with layer names from references that were bound by other people."

Notes from Cadalyst Tip Patrol: The Rename command is a very powerful and useful tool; it can change the name of multiple object properties or types of objects, not just layers. To rename a layer, select the Layer option in the Named Objects column. This will bring up a list of every object of that type in the file, displaying them on the right. In this case, you will select the layer that you want to change from this list. Type in the new name for the layer in the Rename To field located at the bottom right of the window. In the example above, several layers start with the same text. You can select layers with similar text strings by replacing the unique text with an asterisk (*) in the Old Name field. If the layers end with EXISTING, then you will type an asterisk before EXISTING (*EXISTING). You can also select each layer you want to rename one at a time while holding down the Ctrl key.

Tested in AutoCAD 2010

 

Average Rating:
2.666665


User comments
Comment by Slusar,Mark
Posted on 2009-09-16 12:26:31
Instead of having to rename them, have them named differently by ACAD in the first place... Use the "BINDTYPE" command... Use the system variable BINDTYPE to specify your preferred method for binding references files. If you are tired of getting those 0$0 layers; switch your preference to INSERT and the problem goes away. BINDTYPE 0 - Traditional binding behavior (layer "xref1|one" becomes "xref$0$one") 1 - Insert-like behavior (layer "xref1|one" becomes "one")