Message 1 of 14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
HI
I have this Dialog Box and the UNFINISHED Code for it.
What i Need ist to save the chosen option from tog1 tog2 and tog3 for the next session and other drawings.
Ist nasty that the sysvar USERI1-5 just are saved for the drawing and not for other ones.
An Idea? I was reading about creating a own system variable, but it was to difficult for me.
SPIComax : dialog { label = "Comax Beschriftung"; : boxed_column { label = "Wähle eine Beschriftung:"; : row { fixed_width = true; alignment = centered; : button { key = "button1" ; label = "Comax 83cm + 125cm" ; height = 3; is_default = false; } : button { key = "button2" ; label = "Comax 83cm" ; height = 3; is_default = false; } : button { key = "button3" ; label = "Comax 125cm" ; height = 3; is_default = false; } } : spacer {height = 0.3;} : column { fixed_width = true; alignment = left; : toggle { key = "tog1" ; label = "Mit Multiführungslinie*" ; } : toggle { key = "tog2" ; label = "Nur Text" ; } } } : spacer {height = 0.5;} : boxed_column { label = "*Achtung MGB Option Multiführungslinie ausschalten!"; : row { : paragraph { : text_part { label = "Erst Verfügbar ab MGB 2017 ServicePack 2.0"; alignment = left; }} : button { key = "MGB"; label = "MGB Optionen"; is_default = false; } } : column { : toggle { key = "tog3" ; label = "Option Aus (Pflichtfeld) --> Bei Falschanwendung Absturzgefahr!" ; } } } : spacer {height = 0.1;} : row { fixed_width = false; : paragraph { : text_part { label = "By: Pepito"; alignment = left; } } : button { key = "abbrechen"; label = "Abbrechen"; is_default = false; is_cancel = true; height = 2; alignment = right; } } }
(defun C:<Test7 (/ dcl_id btog1 btog2 btog3 tog12var tog3var butt1 butt2 butt3 BMGB) (setq dcl_id (load_dialog "SPI-Comax.dcl")) (if (not (new_dialog "SPIComax" dcl_id)) (exit ) ); end of if (defun Knopfcheck () (setq btog1 (atoi(get_tile "tog1"))) (setq btog2 (atoi(get_tile "tog2"))) (setq btog3 (atoi(get_tile "tog3"))) ) (defun uservar () (if (= tog12var 1)(set_tile "tog1" "1")) (if (= tog12var 2)(set_tile "tog2" "1")) (if (= tog3var 1)(set_tile "tog3" "1"))) (defun Deselect1 ( a / ) (if (= a "1")(set_tile "tog1" "0"))) (defun Deselect2 ( a / ) (if (= a "1")(set_tile "tog2" "0"))) (action_tile "tog1" "(Deselect2 $value)") (action_tile "tog2" "(Deselect1 $value)") (action_tile "tog3" "(setq btog3 1)") (action_tile "button1" "(Knopfcheck)(setq butt1 1)(done_dialog)" );end of action_tile (action_tile "button2" "(Knopfcheck)(setq butt2 1)(done_dialog)" );end of action_tile (action_tile "button3" "(Knopfcheck)(setq butt3 1)(done_dialog)" );end of action_tile (action_tile "MGB" "(setq BMGB 1)(done_dialog)" );end of action_tile (action_tile "abbruch" "(setq BMGB nil btog1 nil btog2 nil btog3 nil butt1 nil butt2 nil butt3 nil) (done_dialog)" );end of action_tile (start_dialog) (unload_dialog dcl_id) (princ) (if (and (= butt1 1)(= btog1 1)(= btog3 1)) (progn (command "kreis" pause pause) (princ "Kreis gezeichnet! ") (prin1))) (if (and (= butt1 1)(= btog2 1)) (progn (command "_pline" pause pause pause "") (princ "Polynilie gezeichnet! ") (prin1))) (if (and (= butt2 1)(= tog12var 1)) (progn (command "_line" pause pause "") (princ "Linie gezeichnet! ") (prin1))) (if (= butt3 1) (progn (command "rechteck" pause pause) (princ "Rechteck gezeichnet! ") (prin1))) (prin1) ) ; end of defun
Solved! Go to Solution.