Solved

Batch layer Rename in AutCAD LT 2009

Posted on 2009-04-14
7
1,021 Views
Last Modified: 2013-12-04
Has anyone had any issues with using the rename command in AutoCAD.

You used to be able to select all layers using the * wildcard, then rename them all using *_P for example.
When i try this in AutoCAD LT 2009 nothing gets renamed.

Any Ideas?
0
Comment
Question by:GegH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 10

Expert Comment

by:borgunit
ID: 24139730
I have read of this issue at the AUGI forum also. THis is from Lynn Allens site.

Renaming Layers
AutoCAD LT 2009 software provides three
ways to rename a layer: double-click the
layer name, select a layer and press F2, or
choose Rename from the shortcut menu.
0
 

Author Comment

by:GegH
ID: 24139856
OK, Thankyou.
Did it go on to say how it is fixed?
I have about 500 layers in our template to rename. It could take a while if i have to change each one individually.
0
 
LVL 10

Expert Comment

by:borgunit
ID: 24140266
0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 
LVL 11

Accepted Solution

by:
darrenmcwi earned 250 total points
ID: 24144625
Unfortunately, over the years Autodesk has trimmed a number of their older programmers who have been there forever and know  how AutoCAD works, why it works the way it does, and where code affects programming in other places.

Wildcards are one of those areas. AutoCAD supports a very wide range of wildcards in a variety of places but the only place you will see the dozen or so powerful wildcards documented is in the AutoLISP reference under the WCMATCH function name. Of course, that doesn't help you having LT.

Rename did do a better job of supporting wildcards than it does now because the newer programmers don't understand where the wildcard code showed it's colors.

As an alternative, you can use a script file to batch rename layers. I've attached the Excel spreadsheet I used to create the attached scriot file. The Script file will need the .TXT extension removed so it can be run, it was added as Experts Exchance doesn't allow files with an .SCR extension.

Essentially, in the Excel spreadsheet, you'll see a number of colored columns. The GREEN column, I past in the list of layer names.  The RED columns, I add text for the prefix and/or suffix. You can highlight the first B2 and C2 through B101 and C101 and press CTRL-D to copy those values down.  Columns D-H or the BLUE columns, are where I either type text or reference one of the first three columns to build the pieces of the script file. It doesn't need to be broken down this way but it makes it easier to edit and modify layer. The PURPLE or I column, I concatenate all the BLUE columns (the parts) together to make the script.

Once the script is there, I copy the PURPLE section into NOTEPAD and save it with a *.SCR file extension. You can then type SCRIPT in AutoCAD or AutoCAD LT and select the script file and the script will run and rename your layers.

To easily get the list of layers, go to the layer dialog. Right click on one of the layer's column headings and select "CUSTOMIZE..." and customize the layer dialog to show only the layer name. You can then highlight all the layers and use Copy/Paste (Ctrl-C & Ctrl-V) to copy and pate them into the first (RED) column in the Excel spreadsheet.
rename.scr.txt
Rename.xls
0
 

Author Closing Comment

by:GegH
ID: 31570349
Fantastic Utililty.
Works perfectly. Very annoying these useful aspects of CAD that people have been using for years seem to get forgotten about. the difference between users and developers i guess.
2010 has the same issue
0
 

Author Comment

by:GegH
ID: 24146326
By the way Darren, i've added a note to the Autodesk Discussion forum explaining the issue. I've not posted your files though.
I asked the question there as well but got no answers. So thankyou again.
0
 
LVL 11

Expert Comment

by:darrenmcwi
ID: 24153319
Feel free use or redistribute them as you feel fit. I'vef used Excel a lot to build not only scripts, but batch files that rename scanned image files into more meaningful names, moving file to different folders where the file and folder names have a naming scheme of some sort. Pretty easy to get Excel to do the cumbersome work for you.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Our company has proprietary drawing files that we do not give to our customers for final documentation. Our customers now require that we give them these drawings. They understand that they are proprietary and do not require them to be in AutoCAD bu…
In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question