The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

HomeFeaturesTutorialsFAQBlogForumTestimonialsContactBuy Hurricane
 All Forums
 Hurricane for AutoCAD
 General Discussion
 Multiple Layer Rename
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

shaunpeppers
New Member

5 Posts

Posted - October 18 2006 :  5:12:28 PM  Show Profile  Reply with Quote
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

Shaun Peppers

n/a
deleted

112 Posts

Posted - October 18 2006 :  5:50:47 PM  Show Profile  Reply with Quote
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

Steve Bubendorf
Go to Top of Page

shaunpeppers
New Member

5 Posts

Posted - October 18 2006 :  7:52:04 PM  Show Profile  Reply with Quote
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

Shaun Peppers
Go to Top of Page

n/a
deleted

112 Posts

Posted - October 18 2006 :  8:36:41 PM  Show Profile  Reply with Quote
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.

Steve Bubendorf
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Hurricane Forum © 2009 - 2026 Go To Top Of Page
This page was generated in 0.38 seconds. Snitz Forums 2000