Okay, I've searched and searched and spent 3 hours trying different things. What do I need to make this work? Lisp part: <other lisp stuff> (set_tile "hvac_curb" "0") (set_tile "hvac_econ" "0") ...... ...... (action_tile "accept" (strcat "(if (equal \"1\" (get_tile \"hvac_curb\")) (setq UnitCurb 1) (setq UnitCurb 0))" "(if (equal \"1\" (get_tile \"hvac_econ\")) (setq UnitEconomizer 1) (setq UnitEconomizer 0))" "(done_dialog)(setq userclick T))" ) DCL part: <other DCL stuff> : column { key = "hvac_options"; label = "Options"; : toggle {key = "hvac_curb"; label = "&Curb"; } : toggle {key = "hvac_econ"; label = "Economi&zer"; } }
An easier method to find problems might be - (defun Accept_function () (setq hvac_curb (get_tile "hvac_curb")) (if (equal hvac_curb "1") (setq UnitCurb 1) (setq UnitCurb 0) ) (setq hvac_econ (get_tile "hvac_econ")) (if (equal hvac_econ "1") (setq UnitEconomizer 1) (setq UnitEconomizer 0) ) (done_dialog) (setq userclick T) ) (action_tile "accept" "(Accept_function)")
What exactly is going wrong? What is the error, or what is it not doing that you think or want it to do? (set_tile "hvac_curb" "0") <-- here you need a number not a string (set_tile "hvac_econ" "0") <-- here you need a number not a string try (set_tile "hvac_curb" 0) (set_tile "hvac_econ" 0) or here try : toggle {key = "hvac_curb"; label = "&Curb"; value="0";} Hope that helps, Tim
And now I see what I was doing wrong in the first place. I thought that it had to be in string form, not a number. So, I guess that I was on the right track, just the wrong train. Thanks for the info.