PDA

View Full Version : How to make this custom toolbar button?



Cadastrophic
29th Oct 2004, 09:38 am
I work a lot with the ACAD (2000) icons and buttons, and I'd really like a particular macro that I can't find anywhere else.
The routine is simply to turn off a selected layer. I've frequently seen a lisp routine for it, but not a macro.
I know macros have to be kept short, and I'm not familliar with how to open a lisp to extract the code anyway.
Is it possible to make such a macro? :unsure:

fuccaro
29th Oct 2004, 10:27 am
Your lisp routine can be called from a macro. Put the lisp in the start up folder to be sure it will be loaded when you start. If the Lisp routine names LAYEROFF the button macro can be:
^C^CLAYEROFF or ^C^C(LAYEROFF)

Dommy2Hotty
29th Oct 2004, 04:05 pm
Your lisp routine can be called from a macro. Put the lisp in the start up folder to be sure it will be loaded when you start. If the Lisp routine names LAYEROFF the button macro can be:
^C^CLAYEROFF or ^C^C(LAYEROFF)

I'm a fan of buttons that call LISP files....but I like this method...

^C^C^C(if (not c:LayerOff)(load "LayerOff"));LayerOff;
If that LISP isn't in memory, it will load then execute it....If it is in memory already, it just executes it.
Saves from getting this error message:

Unknown command "LayerOff". Press F1 for help.

Cadastrophic
30th Oct 2004, 01:23 am
Many thanks guys! I never thought it would be that simple! :shock:
Excuse me now, I'm off to review other lisp routines. :D