Jump to content

problem with my new layer macro


raj banerjee

Recommended Posts

hello,

 

i have tried to create a macro so once the button ispressed which it is attached to anew layer is created, the macro prompts you for the layer colour, once you press enter it the auto fills the first part of the generic layer name and waits for you to fill the last bit which will make it unique.

 

But when you fill in the last bit and press enter it states invalid layer name.

 

Can anyone help pelase?

 

Here is the macro, please dont take the mick out of it as im still learning lol

 

^C^C-LA;MA;"IMTECH_M&E RENAME";LW;DEFAULT;"IMTECH_M&E RENAME";ON;"IMTECH_M&E RENAME";C;\"IMTECH_M&E RENAME";L;CONTINUOUS;"IMTECH_M&E RENAME";P;PLOT;"IMTECH_M&E RENAME";U;"IMTECH_M&E RENAME";E;"IMTECH_M&E RENAME";;-LA;R;"IMTECH_M&E RENAME";"IMTECH_M&E \";

Edited by SLW210
Code Tags!
Link to comment
Share on other sites

Why don't you just insert a block which has only the layer attached that you want (with all properties already assigned), rather than create a layer, then have to rename it?

Link to comment
Share on other sites

  • 2 weeks later...

The problem is with this last bit of the macro:

 

-LA;R;"IMTECH_M&E RENAME";"IMTECH_M&E \"

 

It is waiting for you to strike the enter key to let it know when to stop waiting for user input, but the enter key also finishes the rename command before it can return the " to close the layer name off.

 

You could get around it in one of 2 ways.

 

1. Instead of a space (as in "IMTECH_M&E \") you could put another underscore and remove the quotation marks (as in IMTECH_M&E_\).

 

2. Manually close off the layer name with a quotation mark and take it out of your script (as in "IMTECH_M&E \)

 

Good luck.

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...