raj banerjee Posted January 22, 2013 Share Posted January 22, 2013 (edited) 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 January 30, 2013 by SLW210 Code Tags! Quote Link to comment Share on other sites More sharing options...
JGA Posted January 30, 2013 Share Posted January 30, 2013 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? Quote Link to comment Share on other sites More sharing options...
YZ Posted February 11, 2013 Share Posted February 11, 2013 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.