greatday2882 Posted July 11, 2011 Posted July 11, 2011 Hey guys. I have a macro in AutoCAD 2010 to make a layer and set its color: ^C^C-layer;m;F-ANNO-REV1;C;RED;;; Which works perfectly. We have a customer who has a set of spec'd layers, their revisions need to be on "$REVNOTE1". The macro is exactly the same: ^C^C-layer;m;$REVNOTE1;C;RED;;; But when you run the macro, it completely ignores "$REVNOTE1;" so it sets the new layer as "C", then hangs up on "RED" saying it isn't a valid option. If you manually run through the macro, it works fine. Is there an obvious variable I’m missing to make it not ignore the $? Thank you for any help! Quote
Tyke Posted July 12, 2011 Posted July 12, 2011 The $ symbol in a macro indicates the start of a DIESEL expression, that's why its ignoring the name. Have you tried enclosing the name in quotation marks - "$REVNOTE1" ? If that doesn't work try $("$REVNOTE1"). I'm not on my AutoCAD computer at the moment so I can't try them out. Quote
SLW210 Posted July 12, 2011 Posted July 12, 2011 What is the purpose of naming layers with symbols in the name? Quote
greatday2882 Posted July 12, 2011 Author Posted July 12, 2011 Neither the " " or the $(" ") worked, thank you for the suggestions! Trust me, i would never use symbols in layer names for this exact reason. We do fire alarm design, and per this customer's spec (our largest customer), everything we draw, goes onto "E-COMM-XXXX" layers. The Revisions are "$REVNOTE(1,2,3,Etc.)" and "$REVCLOUD(1,2,3,Etc.)". They run our drawings thru a standards check, and will kick them back if anything is off. For now, we insert clouds and deltas on our normal layers, and manually change them to theirs. I was attempting to streamline this for our designers. Quote
SLW210 Posted July 12, 2011 Posted July 12, 2011 Try a ^$ or $$. I would still let the client know about there poor layer naming. Quote
Tyke Posted July 12, 2011 Posted July 12, 2011 Can you just leave off the $ symbol and add it to the layer names at the end of the job, or use a LISP or VBA routine to create all the layers that you might need with the $ symbol at the beginning and do a PURGE when the jobs done to get rid of all of the unused layers? Quote
BIGAL Posted July 14, 2011 Posted July 14, 2011 another way possibly ^C^C(setq layans "$revnote") -layer;m;!layans;C;RED;;; Quote
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.