functions for radio buttons
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
functions for radio buttons

 
Post new topic   Reply to topic    CADForums.net Forum Index -> AutoCAD
Author Message
chuck
Guest





Posted: Tue Nov 02, 2004 10:30 am    Post subject: functions for radio buttons Reply with quote

I have a dcl with a radio button having a "key" darv.
When I select this button and "ok" I would like to run a lisp routine
(c:darv) what would my autolisp code look like for this?

Back to top
bestafor
Guest





Posted: Tue Nov 02, 2004 6:53 pm    Post subject: Re: functions for radio buttons Reply with quote

HiHO;
(Action_Tile "darv" "(c:darv)")
Now this isn't all the code you will have to write,
but this is the piece that will run your lisp routine.




"chuck" <chuck@nospam.wo> wrote in message
news:9XEhd.1638$14.1352@read1.cgocable.net...
Quote:
I have a dcl with a radio button having a "key" darv.
When I select this button and "ok" I would like to run a lisp routine
(c:darv) what would my autolisp code look like for this?

Back to top
Jürgen Palme
Guest





Posted: Tue Nov 02, 2004 7:51 pm    Post subject: Re: functions for radio buttons Reply with quote

"chuck" <chuck@nospam.wo> schrieb im Newsbeitrag
news:9XEhd.1638$14.1352@read1.cgocable.net...
Quote:
I have a dcl with a radio button having a "key" darv.
When I select this button and "ok" I would like to run a lisp routine
(c:darv) what would my autolisp code look like for this?



A first hint: It makes no sense to have only ONE radio button. You need a
radio_column or a radio_row with at least two radio_buttons.

A snip of a dcl fragment (example):

: radio_column {
key = "k1";
: radio_button {
key = "kk1";
}
: radio_button {
key = "kk2";
}
...
}

In your LISP code you need this lines (fragment):

(action_tile "k1" "(do_something $value)")
....
(defun do_something (wert)
(cond
((= wert "kk1") (do_this))
((= wert "kk2") (do_that))
...
)
)

do_this or do_that can be a call of your (c:darv)


HTH
Juergen

Back to top
chuck
Guest





Posted: Thu Nov 04, 2004 5:02 am    Post subject: Re: functions for radio buttons Reply with quote

I have about twelve radio buttons and an ok_cancel_help row. All the radio
buttons are calls to a function. The help button calls to a custom help
"chuck.hlp" dialog. I've got the radio buttons working pretty well by
assigning a text string to each and then calling to the correct function
when the corresponding radio button is selected. I'm having a little trouble
with the help button though. I would like to bring up the custom hlp file
when selected and have the dialog box remain when the help file is closed.


"Jürgen Palme" <juergenDEL.palmeALL@kabelleipzigCAPS.de> wrote in message
news:2upl7bF2cjgd0U1@uni-berlin.de...
Quote:
"chuck" <chuck@nospam.wo> schrieb im Newsbeitrag
news:9XEhd.1638$14.1352@read1.cgocable.net...
I have a dcl with a radio button having a "key" darv.
When I select this button and "ok" I would like to run a lisp routine
(c:darv) what would my autolisp code look like for this?



A first hint: It makes no sense to have only ONE radio button. You need a
radio_column or a radio_row with at least two radio_buttons.

A snip of a dcl fragment (example):

: radio_column {
key = "k1";
: radio_button {
key = "kk1";
}
: radio_button {
key = "kk2";
}
...
}

In your LISP code you need this lines (fragment):

(action_tile "k1" "(do_something $value)")
...
(defun do_something (wert)
(cond
((= wert "kk1") (do_this))
((= wert "kk2") (do_that))
...
)
)

do_this or do_that can be a call of your (c:darv)


HTH
Juergen

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> AutoCAD All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB