Solved

Batch layer Rename in AutCAD LT 2009

Posted on 2009-04-14
7
947 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
  • 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Following a number of instances of re-installing Solidworks I thought that it may be a  good idea to detail the procedure that I follow each time to ensure a good stable install. Backup: Backup your system.  It goes without saying that this i…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now