DCL radio sample

Discussion in 'AutoCAD' started by The real JD, Aug 19, 2003.

  1. The real JD

    The real JD Guest

    I'm looking for a sample DCL file that shows radio button options. I want to
    create a dialog box that will run different lisps based on a radio
    selection. Any help would be appreciated.
     
    The real JD, Aug 19, 2003
    #1
  2. The real JD

    Odie Silva Guest

    respotool : dialog {
    label = "RESPOTOOL SETUP";
    :boxed_column {
    label = "MAP SCALE";
    :edit_box {
    label = "1 Inch equals : ";
    edit_width = 4;
    value = "40";
    key = "sca";
    }
    }
    :boxed_column {
    label = "SCALE PARAMETERS";
    :edit_box {
    label = "Text Size: (in Inches) ";
    edit_width = 4;
    value = "0.1";
    key = "tsize";
    }
    :edit_box {
    label = "Block Scale Factor: ";
    edit_width = 4;
    value = "1";
    key = "sf";
    }
    }
    :boxed_column {
    label = "TARGET DATA";
    :popup_list {
    label = "Layer ";
    key = "list";
    edit_width = "10";
    height = "20";
    }
    :popup_list {
    label = "Block ";
    key = "list_blk";
    edit_width = "10";
    height = "10";
    }
    :popup_list {
    label = "Style ";
    key = "list_txt";
    edit_width = "15";
    height = "15";
    }
    }
    :boxed_radio_column {
    label = "PRECISION SELECTION";
    key = "PresSel";
    :radio_button {
    label = "1 Decimal Digit";
    value = "1";
    key = "1";
    }
    :radio_button {
    label = "2 Decimal Digits";
    value = "0";
    key = "2";
    }
    :radio_button {
    label = "3 Decimal Digits";
    value = "0";
    key = "3";
    }
    :radio_button {
    label = "4 Decimal Digits";
    value = "0";
    key = "4";
    }
    :radio_button {
    label = "5 Decimal Digits";
    value = "0";
    key = "5";
    }
    }
    ok_cancel;
    }
     
    Odie Silva, Aug 19, 2003
    #2
  3. The real JD

    Rudy Tovar Guest

    Posted this about 2 days or so ago, and same applies to radio_buttons.

    (defun C:example (/ dcl_id1)
    (Load_default_values)
    (setq dcl_id1 (load_dialog "C:\\Temp\\example.dcl"))
    (if (not (new_dialog "main0" dcl_id1)) (exit))
    (set_tile "edit1" edit1value)
    (action_tile "edit1" "(Validate_value_edit1)")
    (action_tile "list1" "(Item_list_selected)")
    (start_dialog)
    (unload_dialog dcl_id1)
    (princ)
    )



    (defun Validate_value_edit1 (/)
    (setq val $val)
    ;Do_what_ever
    (princ)
    )

    (defun Item_list_selected (/)
    (setq val $val)
    ;Do_what_ever
    (princ)
    )

    (defun Load_default_values (/)
    (setq edit1val <what_ever_string_value>)
    ;Do what ever
    (princ)
    )
     
    Rudy Tovar, Aug 19, 2003
    #3
  4. The real JD

    The real JD Guest

    Thanks all for the feedback. It'll take some time for me to digest this...

    But one question i have:
    Is there a way to call up a different slide for each radio button?
    I would like to have a slide that changes according to radio button
    selection.

    Thanks again everyone!
     
    The real JD, Aug 20, 2003
    #4
  5. The real JD

    Rudy Tovar Guest

    This should cover it....

    (action_tile "radio1" "(setq slide_image 1)(slide_show)")
    (action_tile "radio2" "(setq slide_image 2(slide_show)")

    (defun slide_show (/ x y)

    (setq x (dimx_tile "image1")
    y (dimy_tile "image1"))

    (start_image "image1")
    (fill_image 0 0 x y 0)
    (end_image)

    (cond
    ((= slide_image 1)
    (progn
    (start_image "image1")
    (slide_image 0 0 x y "g:\\slide_library\\slide1.sld")
    (end_image)
    )
    )
    ((= slide_image 2)
    (progn
    (start_image "image1")
    (slide_image 0 0 x y "g:\\slide_library\\slide2.sld")
    (end_image)
    )
    )
    )
    (princ)
    )

    --
    Rodolfo Tovar
    www.Cadentity.com
    AUTODESK
    Authorized Developer
     
    Rudy Tovar, Aug 20, 2003
    #5
  6. The real JD

    Rudy Tovar Guest

    Sorry missed a ')'

    (action_tile "radio2" "(setq slide_image 2)(slide_show)")
     
    Rudy Tovar, Aug 20, 2003
    #6
  7. The real JD

    The real JD Guest

    Cool!

    :)load-file-list :)fas "bpc-radio")))¼2 BPC-RADIO
    [I^ZT&xR¨Ã¿<Ã7SÍ1)b7O^F_RO+p_«ËøÈ-^1Hc1';-d
    np.â>î¯YHÍ'}'2&x*vivhe.Äïå· ¨c
    70ëOOî®r÷'U4f~(scj\]E -aVªOøÞÁbSÍp9]sw*dmudwVL'eE¥Þø<-cRÇeJBFWNCVB6~Rä
    ߬Ù?#Íd\GUB]FN;1±ø?à c-S1S@G)CXIO_;aV䦽Ù'-çcCWFCGK6KB.t> É´Î-'R
     
    The real JD, Aug 20, 2003
    #7
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.