本帖最后由 作者 于 2008-11-10 9:04:40 编辑
如果是这种情况怎么处理 dcl_settings : default_dcl_settings { audit_level = 3; } gj : dialog { label = "管件连接尺寸汇编"; : boxed_column { label = "公制"; : column { : popup_list { label = "90° 弯头(L) DN"; key = "00"; mnemonic = "9"; list = "15\n20\n25\n40\n50\n65\n80\n100\n125\n150\n200\n250\n300\n350\n400\n450\n500\n600\n700\n800\n900\n1000\n1100\n1200"; } : popup_list { label = "异径管(同心) DN"; key = "11"; list = "20*15"; } } } ok_cancel; } 如果仅仅只有“90°弯头”的情况下,下面的LSP是可以实现我要的功能的,但现在添加了“异径管”这一项,我 又该如何修改以下lSP来实现我想要选择DN20*15来插入事先做好的块呢? ;;管件连接尺寸汇编 (DEFUN c:gj () (setq dcl_id (load_dialog "gj")) (new_dialog "gj" dcl_id) (action_tile "accept" "(setq gj_done_id (get_tile\"00\"))(done_dialog 1)") (setq gj_done(start_dialog)) (unload_dialog dcl_id) (if (> gj_done 0) (progn (setvar "osmode" 15359) (cond ((= "0" gj_done_id) (dim_gj_1) ) ((= "1" gj_done_id) (dim_gj_2) ) ((= "2" gj_done_id) (dim_gj_3) ) ((= "3" gj_done_id) (dim_gj_4) ) ((= "4" gj_done_id) (dim_gj_5) ) ((= "5" gj_done_id) (dim_gj_6) ) ((= "6" gj_done_id) (dim_gj_7) ) ((= "7" gj_done_id) (dim_gj_8) ) ((= "8" gj_done_id) (dim_gj_9) ) ((= "9" gj_done_id) (dim_gj_10) ) ((= "10" gj_done_id) (dim_gj_11) ) ((= "11" gj_done_id) (dim_gj_12) ) ((= "12" gj_done_id) (dim_gj_13) ) ((= "13" gj_done_id) (dim_gj_14) ) ((= "14" gj_done_id) (dim_gj_15) ) ((= "15" gj_done_id) (dim_gj_16) ) ((= "16" gj_done_id) (dim_gj_17) ) ((= "17" gj_done_id) (dim_gj_18) ) ((= "18" gj_done_id) (dim_gj_19) ) ((= "19" gj_done_id) (dim_gj_20) ) ((= "20" gj_done_id) (dim_gj_21) ) ((= "21" gj_done_id) (dim_gj_22) ) ((= "22" gj_done_id) (dim_gj_23) ) ((= "23" gj_done_id) (dim_gj_24) ) ) ;(mold_res) ) ) (princ) ) (defun dim_gj_1 () (command "jmj" "e15" pause "" "" "" "")) (defun dim_gj_2 () (command "jmj" "e20" pause "" "" "" "")) (defun dim_gj_3 () (command "jmj" "e25" pause "" "" "" "")) (defun dim_gj_4 () (command "jmj" "e40" pause "" "" "" "")) (defun dim_gj_5 () (command "jmj" "e50" pause "" "" "" "")) (defun dim_gj_6 () (command "jmj" "e65" pause "" "" "" "")) (defun dim_gj_7 () (command "jmj" "e80" pause "" "" "" "")) (defun dim_gj_8 () (command "jmj" "e100" pause "" "" "" "")) (defun dim_gj_9 () (command "jmj" "e125" pause "" "" "" "")) (defun dim_gj_10 () (command "jmj" "e150" pause "" "" "" "")) (defun dim_gj_11 () (command "jmj" "e200" pause "" "" "" "")) (defun dim_gj_12 () (command "jmj" "e250" pause "" "" "" "")) (defun dim_gj_13 () (command "jmj" "e300" pause "" "" "" "")) (defun dim_gj_14 () (command "jmj" "e350" pause "" "" "" "")) (defun dim_gj_15 () (command "jmj" "e400" pause "" "" "" "")) (defun dim_gj_16 () (command "jmj" "e450" pause "" "" "" "")) (defun dim_gj_17 () (command "jmj" "e500" pause "" "" "" "")) (defun dim_gj_18 () (command "jmj" "e600" pause "" "" "" "")) (defun dim_gj_19 () (command "jmj" "e700" pause "" "" "" "")) (defun dim_gj_20 () (command "jmj" "e800" pause "" "" "" "")) (defun dim_gj_21 () (command "jmj" "e900" pause "" "" "" "")) (defun dim_gj_22 () (command "jmj" "e1000" pause "" "" "" "")) (defun dim_gj_23 () (command "jmj" "e1100" pause "" "" "" "")) (defun dim_gj_24 () (command "jmj" "e1200" pause "" "" "" ""))
(princ)
|