I am trying to use the script "RENAME LAYER" but I want it to do more than one layer at a time. I have a list that I want to look for and change. It works fine till i get to a layers that does not already exist. how can I have it skip that layer and look for the next one on my list? I have attached a shortend version of my my script below.
;Rename a BLOCK. ;CAN ALSO BE USED TO RENAME ;Block/Dimstyle/LAyer/LType/Style/Ucs/VIew/VPort _RENAME _LAYER ;THE NEXT LINE IS THE LAYER NAME TO REPLACE A-TBLK-LIN1 ;THE NEXT LINE IS THE NEW LAYER NAME 57-A-TBLK-LIN1
Shaun, Try renaming the attached file with a lsp extension rather than zip extension. Backup your drawings. Place the renamelayers.lsp file in your autocad path or the same folder as your drawings. Create a two line script as follows: (load "renamelayers") renamelayers
Run the script. Hopefully it will work based on the layer names in the script you provided. (If I didn't mistype something.) Let me know if it works or not. If it doesn't, it should be something like a typo that I can fix, if you will let me know. (You can open up the file with a text editor, to see what it is doing. Basically, I just used Lisp to search the drawing for the old layer name. If it exists, then it processes the rename command.)
Great !! I'm glad it worked for you. I get so much help from this and other AutoCAD related forums that it feels good to be able to actually provide some help to someone else once in a while.