LSP程序: (defun c:first() (setvar "cmdecho" 0) (setq wei1_list '("白炽灯" "荧光灯(单管)" "荧光灯(双管)" "荧光灯(多管)" "高强气体放电灯" "卤钨灯")) (setq wei2_list '("清洁" "一般" "污染")) (dcl_first) (prin1) ) (defun dcl_first() (setq dcl_id(load_dialog "first")) (new_dialog "first" dcl_id) (show_list "wei1" wei1_list) (show_list "wei2" wei2_list) (cond ((and (= wei1 "0") (= wei2 "0")) (set_tile "whxs" "0.75")) ((and (= wei1 "0") (= wei2 "1")) (set_tile "whxs" "0.70")) ((and (= wei1 "0") (= wei2 "2")) (set_tile "whxs" "0.65")) ((and (= wei1 "1") (= wei2 "0")) (set_tile "whxs" "0.75")) ((and (= wei1 "1") (= wei2 "1")) (set_tile "whxs" "0.7")) ((and (= wei1 "1") (= wei2 "2")) (set_tile "whxs" "0.65")) ((and (= wei1 "2") (= wei2 "0")) (set_tile "whxs" "0.75")) ((and (= wei1 "2") (= wei2 "1")) (set_tile "whxs" "0.70")) ((and (= wei1 "2") (= wei2 "2")) (set_tile "whxs" "0.65")) ((and (= wei1 "3") (= wei2 "0")) (set_tile "whxs" "0.75")) ((and (= wei1 "3") (= wei2 "1")) (set_tile "whxs" "0.70")) ((and (= wei1 "3") (= wei2 "2")) (set_tile "whxs" "0.65")) ((and (= wei1 "4") (= wei2 "0")) (set_tile "whxs" "0.75")) ((and (= wei1 "4") (= wei2 "1")) (set_tile "whxs" "0.70")) ((and (= wei1 "4") (= wei2 "2")) (set_tile "whxs" "0.65")) ((and (= wei1 "5") (= wei2 "0")) (set_tile "whxs" "0.85")) ((and (= wei1 "5") (= wei2 "1")) (set_tile "whxs" "0.75")) ((and (= wei1 "5") (= wei2 "2")) (set_tile "whxs" "0.70")) ) ) (action_tile "wei1" "(sub_wei1 $value)") (action_tile "wei2" "(sub_wei2 $value)") (action_tile "accept" "(ok_first)(done_dialog)") (start_dialog) ) (defun ok_first() setq whxs(get_tile "whxs") ) (defun show_list(key newlist) (start_list key) (mapcar 'add_list newlist) (end_list) ) (defun sub_wei1(vvs) (set_tile "wei1"(nth(atoi vvs) wei1_list)) ) (defun sub_wei1(vvs) (set_tile "wei2"(nth(atoi vvs) wei2_list)) ) DCL程序: first:dialog{ label="电气计算软件系列—照度计算"; :boxed_column{ label="维护系数:"; :row{ :popup_list{ label="灯具类型:"; key="wei1"; width=24; height=10; } :popup_list{ label="污染特性:"; key="wei2"; width=24; height=10; } :edit_box{ label="维护系数:"; key="whxs"; width=24; } } } ok_cancel; } 希望帮忙看看,问题出在哪里,怎么修改才能实现 谢谢了。DCL程序应该没问题 |