Trying to create a custom button that will preform the following with one click
-purge all, then zoom extent,save, turn layer to 0.
Trying to create a custom button that will preform the following with one click
-purge all, then zoom extent,save, turn layer to 0.
Can you type what you want from the Command line and have it do what you need?
If so then the keystrokes can be made a Macro.
^C^C-Purge;All;*;No;Zoom;Extents;LA;Set;0;;
or
^C^C-Purge;A;*;N;Z;E;LA;S;0;;
Charles Shade LT 2013
www.cshadedesign.com
If memory serves, LA is the built-in keyboard shortcut for the LAYER Command, and not the -LAYER Command as is needed for this particular macro.
Also, as I need for my customizations to support multiple versions, I tend to 'spell out' the command options to avoid issues as discussed here.
HTH
"Potential has a shelf life." - Margaret Atwood
Worked here
Charles Shade LT 2013
www.cshadedesign.com
I thought that LA was the common OOTB alias for Layer?
I've never changed the pgp or any alias's for that matter.
Though I think your input is worth at least a nickle maybe $0.06![]()
Charles Shade LT 2013
www.cshadedesign.com
Perhaps I was unclear....
OOTB the LA keyboard shortcut invokes the LAYER Command (the dialog version), and not the -LAYER Command (the command line version).
If one user has LA defined OOTB (i.e., the LAYER Command), and another has LA defined (either by acad.pgp, LISP, CUIx, etc.) as the -LAYER Command, then the same macro will yield different results.
Also worthy of note, is that one's LAYERDLGMODE System Variable setting may also yield difference results.
By explicitly specifying -LAYER within the macro, you achieve standardization, without being affected by the user's customizations... Not that you have to, it's just a good way of avoiding potential complications (win-win).
Were I to incorporate a similar macro in our setup, I'd have used:
pseudo macro:
... Or, my preference is to use LISP for it's *error* handling, but this request is for someone using LT, so I digress.Code:^C^C._-purge all * no ._zoom extents ._-layer set 0
Also, for those that have full versions (i.e., LISP enabled), you might consider using SETVAR in lieu of the -LAYER Command:
That is very kind of you to say, clshade.Code:(setvar 'clayer "0")![]()
![]()
"Potential has a shelf life." - Margaret Atwood
Yep, way beyond the details I've ever gotten into.
I've never been too sure about starting (using) the Command with ._- I know this helps translate the Macro for other languages but that is about it.
Excellent information for more than just a passing shot at this Macro
Now that I've used it I think I'll add it to my setup.
I do tend to finish drawings this way and it sure is simple.
Need to add OVERKILL (LT 2013) and AUDIT to it
OVERKILL-AUDIT-PURGE
Last edited by clshade; 2012-08-22 at 05:28 PM.
Charles Shade LT 2013
www.cshadedesign.com
If we want to write Macros correctly, we should all go all the way instead of partially correcting each other:
^C^C._-purge;_all;*;_no;._-purge;_regapps;*;_no;._zoom;_extents;._-layer;_set;0;;
Leaving blanks for <enter> is never good coding 'best' practice IMHO.