Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create a popup (dialog box) with selections to run scripts, lisps

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
804 Views, 6 Replies

Create a popup (dialog box) with selections to run scripts, lisps

I'd like to create a button that pops up a dialog box in AutoCAD (2009 or 2010) with 5 or 6 radio buttons for selection. Then depending on the selection, run the script or lisp under the button selected. What's the general process to achieve this?
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

Why not connect the scripts and 'lisps' to a vanilla flyout on a vanilla
toolbar ? This sounds somehow like using a plier to manipulate a plier !

--
Humans are born with a wide horizon.
As time goes by, the horizon narrows and
narrows, until it becomes a point of view.


a écrit dans le message de news:
6264484@discussion.autodesk.com...
I'd like to create a button that pops up a dialog box in AutoCAD (2009 or
2010) with 5 or 6 radio buttons for selection. Then depending on the
selection, run the script or lisp under the button selected. What's the
general process to achieve this?
Message 3 of 7
M_Hensley
in reply to: Anonymous

You need to write a DCL file defining your dialog box. You can then control it from a lisp program.

It may help to start off with an example that is similar to what you want and try to modify it, or maybe download OpenDCL and see if that is easier for you.
Message 4 of 7
Anonymous
in reply to: Anonymous

I was just curious how I would go about making a popup in AutoCAD. True, a ribbon or toolbar button with a flyout would be acceptable. Now you did it, LOL. I'd like to know how to create a ribbon section for this as well. Any suggestions? What is presently recommended by Autodesk regarding developing current customization for AutoCAD users? Keeping in mind any methods that may no longer be supported in the near future...

kinda opening a can of worms on this huh? 😉
Message 5 of 7
Anonymous
in reply to: Anonymous

Thank you. Edited by: powermixx on Oct 1, 2009 7:55 PM
Message 6 of 7
Anonymous
in reply to: Anonymous

Thanks for the info. Looking over it quickly, it looks a lot like Visual Basic. In general, how would I package, compile, deploy, etc. for AutoCAD?
Message 7 of 7
Anonymous
in reply to: Anonymous

You don't need to go as far as VB in order to have that simple dialog if you
really want to go that way. DCL or ODCL is far more accessible. The problem
with DCL is that DCL GUIs are modal and then not everything can be run
behind a modal dialog in AutoCAD, especially programs that require screen
selection and stuff.

So you will have to select the command and then to dismiss the DCL dialog in
order to continue, which makes three mouse clicks using this approach
comparing with one with a toolbar button and two with a flyout. But if you
really want it, try the attached one.

Assuming that you have a LISP file named COMMANDS.LSP placed in a declared
path and you have six commands defined in that file named command_a to
command_f, then you could call the attached function from a tool bar button
or menu item like this:

^C^C(call_lisp "commands.lsp")

Look inside the function and remark that the radio button keys are named
with the name of the six commands defined in the LISP file. This is very
important with this setup.

HTH










--
Humans are born with a wide horizon.
As time goes by, the horizon narrows and
narrows, until it becomes a point of view.


a écrit dans le message de news:
6264529@discussion.autodesk.com...
Thanks for the info. Looking over it quickly, it looks a lot like Visual
Basic. In general, how would I package, compile, deploy, etc. for AutoCAD?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report