DCL radio sample

The Real JD

Usenet Archive
Joined
Jul 28, 2003
Messages
183
Reaction score
0
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.
 
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;
}
 
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)
)
 
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!
 
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)
)
 
Sorry missed a ')'

(action_tile "radio2" "(setq slide_image 2)(slide_show)")
 
Cool!

DonB said:
You might also find the attached VLX helpful.

It will create a Radio on the fly by writing a temporary DCL based on the number of list items.

The temp file is deleted after the selection is made.

The temp file name is (strcat (getvar "TEMPPREFIX") "temp.dcl")

The syntax is: (bpc-radio Label List Default)

(bpc-radio "Hello" '("123" "456" "789") 2); Default is "456"

Don

want
(:load-file-list (:fas "bpc-radio")))¼2 BPC-RADIO
FAS4-FILE ; Do not change it!
1055
81 $ O\ N\ M\ LQK
W. J\I5HgI5G
W PFFEM5D C5BhBM5D A5Bh@hW
?>W
=M5<>W
=M5;5<> :59 85<II 7565 4553
2 15<553
0553
/553
.O 15<553
-553
,553
+553
*553
)553
2(N] '\gi\('\)] &553
%(5; 15<553
(5$( #' 15<553
"553
Wÿÿÿ !553
553
553
553
553
!553
,553
555I55 555g 5
5
W2( >5
>25
25
5N5]\2Kg0\P] =(5;5< 5 
(5$(WÅÿÿÿ
5 
 5 
555
I5HgI5G
W2d5Bg 5
W25Bj jg!2555N5WtM5D C5BhNM5D A5Bh@hW 2N5W M55N5W M5N5 $ 1075 4 $ðùSÃPRÿdVR*ILO+~äùÈÃbQÍt5Em&C" Hä׶ß > ^IDYB.täÙù<ëbz¾bE,'s)g4tu;)`H:Ìá-ï¦=&¤kT}%s$w&as9-9Kj_¡¿ß ]B^N6nG­À½<Ã7SÍ1)b7$T_RY 2c\©ܬ<Ã7SÍ1WC{&x,v'ybsB]|.è'å¤B7¿u^/&I
[I^ZT&xR¨ÿ<Ã7SÍ1)b7O^F_RO+p_«ËøÈ-^1Hc1';-d
np.â>î¯YHÍ'}'2&x*vivhe.Äïå· ¨c
E2g4c1arunndèOãã_r¹uD8 said:
+B3Ĭثã 7´' }%yPc1';-+B 3-íoâ¬=0¸sE2i2<O
EBV@'häÙò<Ûbrí'}ks%q/,%hhgRgÄã-îáYCÍ'}'2,q:,%ohf1ß.ø«ãBhíe^%bvf"untRh ]f?âØðÂb/Ã}'2gc*uss09W 䬨ý¢'¨:M2g4c1l~t6@EvoøڰÈbrí' }sw?`cj/0k13ÄàTé¦oï\fNF9XI^
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
 

Latest threads

Back
Top