Jump to content

rename of layers


JamesBorubar

Recommended Posts

Hi, I can rename layer "new" to "very new". but I cannot rename layer from "very new" to "new". I tried to write a script. But it doesn't work :(

Link to comment
Share on other sites

You could do this with LAYTRANS.

Or perhaps you can create a new layer, based on "very new", so that it has all the same properties as "very new", then use LAYMRG to merge those two layers onto your newly created "NEW" layer.

Did you do a purge of the dwg before trying this, might the layer name NEW exist in the drawing history, so that it is the reason you can't do it?

 

I just opened a new drawing on 2013 Vanilla, created a new layer based on the 0 layer, which I called Very New.

I then renamed it to New, with no problems.

After which I renamed it again, back to Very New (without having purged), and it worked fine. :|

 

Sounds like the problem is in your script, not the software.

Edited by Dadgad
Link to comment
Share on other sites

You could do this with LAYTRANS.

Or perhaps you can create a new layer, based on "very new", so that it has all the same properties as "very new", then use LAYMRG to merge those two layers onto your newly created "NEW" layer.

Did you do a purge of the dwg before trying this, might the layer name NEW exist in the drawing history, so that it is the reason you can't do it?

 

I just opened a new drawing on 2013 Vanilla, created a new layer based on the 0 layer, which I called Very New.

I then renamed it to New, with no problems.

After which I renamed it again, back to Very New (without having purged), and it worked fined. :|

 

Sounds like the problem is in your script, not the software.

 

Problem is with old name of layer named with two separately words like "Dimension (ISO)", when I use command -rename. I cannot use within script command LAYTRANS.

With one drawing it is no problem, but I've got hundred of drawings ...

Link to comment
Share on other sites

How many different layer name changes would you guess you might have?

Just a handful, or too numerous to speculate?

 

If it is just a small number, perhaps you could create a Drawing Standards drawing to associate with them.

Or just use LAYTRANS, but not in a script?

 

Lee Mac has one that might help you, not sure, I have never used it.

 

http://www.lee-mac.com/pslay.html

 

or possibly http://www.lee-mac.com/scriptwriter.html

 

Thanks Lee! :beer:

Link to comment
Share on other sites

Thanks Dadgad,

I've already tried this lisp. It can remove (add) suffix and prefix, but cannot remove "(ISO)" from layer name "Dimension (ISO)".

Layers in my drawings are not too many. But drawings are many.

Link to comment
Share on other sites

Are you using "quote marks" in your script, because the command works fine from the command line without quotes, but in both macros and scripts will only work when quotes are used, otherwise it translate the spaces into the same as using the enter key

Link to comment
Share on other sites

Are you using "quote marks" in your script, because the command works fine from the command line without quotes, but in both macros and scripts will only work when quotes are used, otherwise it translate the spaces into the same as using the enter key

 

Yes, I used "quote marks" but they disappered when saved script with "Script Writer V1.2" by Lee Mac. Why? I don't know. It was reason why I couldn't run my script.

 

Now it works correct.

Thanks

Edited by JamesBorubar
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...