TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: CB_Cal_UK on February 26, 2004, 11:23:32 AM

Title: Simple Command (Lisp Function?)
Post by: CB_Cal_UK on February 26, 2004, 11:23:32 AM
Well it's finally happened and I've been upgraded to ADT 2004 and I'm in the process of recreating all my profiles and power toolbars etc etc that I didn't want to just import and screw everything up.

As mentioned in a previous post I have additional commands linked to my object snap pop up menu that allow me to 'clean' and 'save' drawings.

Basically the command line reads:
-purge;a;;n;audit;y;z;a;qsave;close;

What I want to do is add a command in there somewhere before the save that sets the current layer to 0. Is this possible? And if so which of you guru's is going to be quickest to reply!

Thanks in advance

Chris
Title: Simple Command (Lisp Function?)
Post by: hudster on February 26, 2004, 11:47:43 AM
Is this what your looking for

Code: [Select]
^c^c-purge;a;;n;audit;y;z;a;-LAYER;SET;0;;qsave;close;
Title: Simple Command (Lisp Function?)
Post by: CB_Cal_UK on February 26, 2004, 11:56:07 AM
That was almost perfect! I had to add another ';' after the '0' to end the layer command. I hadn't thought of invoking it on the command line, so thanks very much!

Code: [Select]
^c^c-purge;a;;n;audit;y;z;a;-LAYER;SET;0;;qsave;close;

p.s.
I hope this little command string proves useful to other users as well. Maintaining a clean drawing not only makes life easier but it keeps file sizes down and maintains consistent views and settings. Rolling it all into one command string also makes it a one click command and should help even the laziest of draughtsmen!