Jump to content

Rename the layer of a selected line or object without affecting same layer


MasterApprentice

Recommended Posts

Hi Everyone!

 

I just want to ask your help regarding some LISP routines I need. The specific routine/code is described as follows:

1. Select a line/object

2. Prompt of a dialog box to rename its layer

3. Rename the layer (not just put a prefix or suffix)

4. The renamed layer will carry the selected objects properties and will not create new properties for it (unless it will be the same)

5. Change only the selected layer and not affect other object with layer similar to it

6. Maintain the layer of the selected object and then copy/rename its layer which is inline with number 5 as the layers object will be renamed but will not affect other object with the same layer name/properties.

 

I've come across a very useful code on a post by alanjt in the link below, the only problem is that the code rename a selected object's layer but also changes other objects with the same layer. My requirements is that it will only rename the object's layer and not affect the others. If only I could tweak the code below but I was having a hard time to do so since I'm still learning to code in LISP. I would highly appreciate any help you can provide :-)

 

http://www.cadtutor.net/forum/showthread.php?79266-copy-rename-layer/page5

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...