functions for radio buttons

Discussion in 'AutoCAD' started by chuck, Nov 2, 2004.

  1. chuck

    chuck Guest

    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?
     
    chuck, Nov 2, 2004
    #1
  2. chuck

    bestafor Guest

    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.
     
    bestafor, Nov 2, 2004
    #2

  3. 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
     
    Jürgen Palme, Nov 2, 2004
    #3
  4. chuck

    chuck Guest

    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.
     
    chuck, Nov 4, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.