|
Would you like a dialog complete with slider? //DCL CODING STARTS HERE : edit_box { : slider { ok_cancel ; } Save this as "Slide.dcl". Now the AutoLisp Coding : ;CODING STARTS HERE (setq lngth 50.0) (setq dcl_id (load_dialog "slide.dcl")) (if (not (new_dialog "slide"
dcl_id) );not (exit) );if (set_tile "eb1" "50") (mode_tile "eb1" 2) (action_tile "myslider" "(slider_action $value $reason)") (action_tile "eb1" "(ebox_action $value $reason)") (defun slider_action (val why) (if (or (= why 2) (= why 1)) (set_tile "eb1" val))) (defun ebox_action (val why) (if (or (= why 2) (= why 1)) (set_tile "myslider" val))) (action_tile (strcat "(progn (setq lngth (get_tile
\"eb1\"))" "(done_dialog)(setq userclick
T))" );strcat );action tile (action_tile "(done_dialog) (setq userclick
nil)" );action_tile (start_dialog) (unload_dialog dcl_id) (if userclick (alert (strcat "You Selected: "
lngth)) );if userclick (princ) );defun (princ) Save this as "Slide.lsp". |
|