The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Hurricane for AutoCAD
 General Discussion
 Multiple Layer Rename

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Attach a File

Check here to subscribe to this topic.
   

T O P I C    R E V I E W
shaunpeppers Posted - October 18 2006 : 5:12:28 PM
Hi,

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

_RENAME
_LAYER
A-TBLK-LIN2
59-A-TBLK-LIN2

_RENAME
_LAYER
A-TBLK-LIN3
60-A-TBLK-LIN5

_RENAME
_LAYER
A-TBLK-LIN5
60-A-TBLK-LIN5

_RENAME
_LAYER
A-TBLK-TEXT
14-A-TBLK-TEXT

_RENAME
_LAYER
A-TBLK-LOGO
14-A-TBLK-LOGO
3   L A T E S T    R E P L I E S    (Newest First)
n/a Posted - October 18 2006 : 8:36:41 PM
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.
shaunpeppers Posted - October 18 2006 : 7:52:04 PM
sbubendorf,

great thanks it worked perfect. I added all of my layers in the format you had for the lisp file and everything worked perfect.

Thanks, Shaun
n/a Posted - October 18 2006 : 5:50:47 PM
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.)

Download Attachment: renamelayers.zip
1.04 KB

The Hurricane Forum © 2009 - 2021 Go To Top Of Page
This page was generated in 0.18 seconds. Snitz Forums 2000