Jump to content

Recommended Posts

Posted

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! icon7.gif

Posted

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.

Posted

What is the purpose of naming layers with symbols in the name? :?

Posted

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.

Posted

Try a ^$ or $$. I would still let the client know about there poor layer naming.

Posted

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?

Posted

another way possibly ^C^C(setq layans "$revnote") -layer;m;!layans;C;RED;;;

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