--
Tracey Taylor
Dynaload Division
www.transdev.com
Yes, you can assign a LISP routine to a button. You won't have to put
the commands in your ACAD.lsp. Follow these steps. They might not be
the best way, but they will work.
1. Right-click on an existing toolbar and the Toolbars box appears.
2. Select the customize button. The Customize Toolbars box appears.
3. Select the category you wish to use then drag the icon into a
clear space in the window.
4. Close the Customize Toolbar window and right click on the button
that now shows on your screen. A Button Properties box will appear.
A. In the Name blank, enter the a name that describes the
command {doesn't have to be the routine name}.
B. In the Help blank, enter the text that you wish to appear in
the status bar at the bottom of the screen.
C. In the Macro box, enter a command like the one following:
^C^C(load "l:/mce/r14/lisp/zoom2txt")(C:zoom2txt)
D. You may at this point also select a button icon if you choose
to use another in place of the one you previously selected. Also, you
can create one on the spot.
5. Select Apply and close the Button Properities window.
6. Close the Customize Toolbar window.
7. Close the Toolbar window.
At this point, the menu will recompile and should be ready for use.
This is not the only one, just one way of doing it. I'm sure many
other better suggestions will come along, but this one should get you
going.
Hope this helps.
On Tue, 14 Jul 1998 07:56:23 -0400, Tracey Taylor
<tayl...@mailer.transdev.com> wrote these significant words:
>before i spend the time trying to figure out how to do this, can a lisp
>routine be assigned to a toolbar button? i'm assuming that i would have
>to put the routine in the acad.lsp file so it loads at startup. some of
>my users like keyboard entry, others want a button.
Jeff Foster
Owner, CADShack
http://www.cadshack.com
CAD Specialist, McKim & Creed
http://www.mckimcreed.com
So you have...
;;;Something.lsp
(defun c:MyCommand ()
...
)
Now assing to the button:
[.......]^C^CMyCommand
Add to your acad.lsp
(autoload "Something" '("MyCommand"))
Thats all (I think)
Eduardo Muñoz
The 2 ^C^C's (CTRL C) cancel any current command; then, if the lisp routine
is NOT loaded; loads it, else it just executes the command "defun
c:your_routine_command ()". Hope this helps.
Bill Farmer
Jeff Foster wrote in message <35ab570...@adesknews.autodesk.com>...
>>before i spend the time trying to figure out how to do this, can a lisp
>>routine be assigned to a toolbar button? i'm assuming that i would have
>>to put the routine in the acad.lsp file so it loads at startup. some of
>>my users like keyboard entry, others want a button.
>
>
Bill's suggestion is a good one. I would definitely incorporate it.
You may wish to add your LISP file directory to your AutoCAD support
path so that you can keep from having to include pathing in your
command definitions. This allows for simple relocation of files later
if required.
On Tue, 14 Jul 1998 22:54:33 -0500, "Bill Farmer"
<bfa...@acmefan.com> wrote these significant words:
>Tracey,
> You might want to modify Jeff's macro line to this:
>^C^C(if (not your_routine_name) (load "your_routine_name"))
>your_routine_name_command
>
>The 2 ^C^C's (CTRL C) cancel any current command; then, if the lisp routine
>is NOT loaded; loads it, else it just executes the command "defun
>c:your_routine_command ()". Hope this helps.
>
>Bill Farmer
>
<snip>
i like the idea of loading the lisp when the button is picked instead of loading
it at startup, especially for those routines that don't get used alot. with the
help of this newsgroup i'm becoming the customizing-guru at work <g>. it wasn't
a hard title to obtain, we've never done any customizing before!
Have a goodin!
Bill
Tracey Taylor wrote in message <35AC9CD2...@mailer.transdev.com>...
On Wed, 15 Jul 1998 11:09:42 -0400, "Doug K" <******@voicenet.com>
wrote these significant words:
>What? I can get paid for this stuff?
--
Doug Kochel
Designer/Draftsman, Bohler Engineering, Inc.
"spammers made me do it"
change the stars to dougck (you know why)
--------------------------------------------------------------------
Bill Farmer wrote in message <6oi9cl$c1...@adesknews2.autodesk.com>...
Cabot
Tracey Taylor wrote:
>
> thanks guys,
>
> i like the idea of loading the lisp when the button is picked instead of loading
> it at startup, especially for those routines that don't get used alot. with the
> help of this newsgroup i'm becoming the customizing-guru at work <g>. it wasn't
> a hard title to obtain, we've never done any customizing before!
>
> Tracey Taylor
> Dynaload Division
> www.transdev.com
--
Mark Eudaley Engineers, Inc.
me...@ionet.net
(remove NOSPAM from reply to)
"^C^C(if (null C:XXX) (load "C:/alisp/XXX")) XXX
it will load from either source. After the first time, you can type the name
if you wish.
Of course, you'll have to put in the proper drive and directory, and
substiute the routine name for the XXX in the above example.
Bryan
Cabot Eudaley wrote in message <35AFC60C...@ionet.net>...
>If you define your button with the (load) routine
>then you won't be able to just type it at the
>command line
--snip--
If XXX.LSP also defines C:XX and C:X then
(autoload "XXX" '("XXX" "XX" "X")) would load
XXX.LSP if you typed any of them.
Cabot