2008.11.10 *****列表对话框问题*****JXLSP再帮我看一下
本帖最后由 作者 于 2008-11-10 9:04:40 编辑 <br /><br /> <p>如果是这种情况怎么处理</p><p>dcl_settings : default_dcl_settings { audit_level = 3; }</p><p>gj : dialog {<br/> label = "管件连接尺寸汇编";<br/> : boxed_column {<br/> label = "公制"; <br/> : column {<br/> : popup_list {<br/> label = "90° 弯头(L) DN";<br/> key = "00";<br/> mnemonic = "9";<br/> 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";<br/> }<br/> : popup_list {<br/> label = "异径管(同心) DN";<br/> key = "11"; <br/> list = "20*15";<br/> }<br/> }<br/> }<br/> ok_cancel;<br/>}</p><p></p><p><font color="#ff0000">如果仅仅只有“90°弯头”的情况下,下面的LSP是可以实现我要的功能的,但现在添加了“异径管”这一项,我 又该如何修改以下lSP来实现我想要选择DN20*15来插入事先做好的块呢?</font></p><p>;;管件连接尺寸汇编<br/>(DEFUN c:gj () <br/> (setq dcl_id (load_dialog "gj"))<br/> (new_dialog "gj" dcl_id)</p><p>(action_tile "accept" "(setq gj_done_id (get_tile\"00\"))(done_dialog 1)")</p><p></p><p>(setq gj_done(start_dialog))<br/>(unload_dialog dcl_id)</p><p>(if (> gj_done 0)<br/> (progn <br/> (setvar "osmode" 15359) <br/> (cond ((= "0" gj_done_id)<br/> (dim_gj_1)<br/> )<br/> ((= "1" gj_done_id)<br/> (dim_gj_2)<br/> )<br/> ((= "2" gj_done_id)<br/> (dim_gj_3)<br/> )<br/> ((= "3" gj_done_id)<br/> (dim_gj_4)<br/> )<br/> ((= "4" gj_done_id)<br/> (dim_gj_5)<br/> )<br/> ((= "5" gj_done_id)<br/> (dim_gj_6)<br/> )<br/> ((= "6" gj_done_id)<br/> (dim_gj_7)<br/> )<br/> ((= "7" gj_done_id)<br/> (dim_gj_8)<br/> )<br/> ((= "8" gj_done_id)<br/> (dim_gj_9)<br/> )<br/> ((= "9" gj_done_id)<br/> (dim_gj_10)<br/> )<br/> ((= "10" gj_done_id)<br/> (dim_gj_11)<br/> )<br/> ((= "11" gj_done_id)<br/> (dim_gj_12)<br/> )<br/> ((= "12" gj_done_id)<br/> (dim_gj_13)<br/> )<br/> ((= "13" gj_done_id)<br/> (dim_gj_14)<br/> )<br/> ((= "14" gj_done_id)<br/> (dim_gj_15)<br/> )<br/> ((= "15" gj_done_id)<br/> (dim_gj_16)<br/> )<br/> ((= "16" gj_done_id)<br/> (dim_gj_17)<br/> )<br/> ((= "17" gj_done_id)<br/> (dim_gj_18)<br/> )<br/> ((= "18" gj_done_id)<br/> (dim_gj_19)<br/> )<br/> ((= "19" gj_done_id)<br/> (dim_gj_20)<br/> )<br/> ((= "20" gj_done_id)<br/> (dim_gj_21)<br/> )<br/> ((= "21" gj_done_id)<br/> (dim_gj_22)<br/> )<br/> ((= "22" gj_done_id)<br/> (dim_gj_23)<br/> )<br/> ((= "23" gj_done_id)<br/> (dim_gj_24)<br/> )<br/> </p><p></p><p> )<br/> ;(mold_res)<br/> )<br/> ) <br/> (princ)<br/>)</p><p></p><p></p><p> <br/> <br/> </p><p><br/>(defun dim_gj_1 () (command "jmj" "e15" pause "" "" "" ""))<br/>(defun dim_gj_2 () (command "jmj" "e20" pause "" "" "" ""))<br/>(defun dim_gj_3 () (command "jmj" "e25" pause "" "" "" ""))<br/>(defun dim_gj_4 () (command "jmj" "e40" pause "" "" "" ""))<br/>(defun dim_gj_5 () (command "jmj" "e50" pause "" "" "" ""))<br/>(defun dim_gj_6 () (command "jmj" "e65" pause "" "" "" ""))<br/>(defun dim_gj_7 () (command "jmj" "e80" pause "" "" "" ""))<br/>(defun dim_gj_8 () (command "jmj" "e100" pause "" "" "" ""))<br/>(defun dim_gj_9 () (command "jmj" "e125" pause "" "" "" ""))<br/>(defun dim_gj_10 () (command "jmj" "e150" pause "" "" "" ""))<br/>(defun dim_gj_11 () (command "jmj" "e200" pause "" "" "" ""))<br/>(defun dim_gj_12 () (command "jmj" "e250" pause "" "" "" ""))<br/>(defun dim_gj_13 () (command "jmj" "e300" pause "" "" "" ""))<br/>(defun dim_gj_14 () (command "jmj" "e350" pause "" "" "" ""))<br/>(defun dim_gj_15 () (command "jmj" "e400" pause "" "" "" ""))<br/>(defun dim_gj_16 () (command "jmj" "e450" pause "" "" "" ""))<br/>(defun dim_gj_17 () (command "jmj" "e500" pause "" "" "" ""))<br/>(defun dim_gj_18 () (command "jmj" "e600" pause "" "" "" ""))<br/>(defun dim_gj_19 () (command "jmj" "e700" pause "" "" "" ""))<br/>(defun dim_gj_20 () (command "jmj" "e800" pause "" "" "" ""))<br/>(defun dim_gj_21 () (command "jmj" "e900" pause "" "" "" ""))<br/>(defun dim_gj_22 () (command "jmj" "e1000" pause "" "" "" ""))<br/>(defun dim_gj_23 () (command "jmj" "e1100" pause "" "" "" ""))<br/>(defun dim_gj_24 () (command "jmj" "e1200" pause "" "" "" ""))</p><p><br/>(princ)</p><p></p> <p>修改成这样即可</p><p>(defun dim_crk_1 () (command "-insert" "1.dwg" pause "" "" "" ""))<br/>(defun dim_crk_2 () (command "-insert" "2.dwg" pause "" "" "" ""))</p><p></p><p><br/></p> 120120发表于2008-11-9 16:33:00static/image/common/back.gif修改成这样即可(defun dim_crk_1 () (command \"-insert\" \"1.dwg\" pause \"\" \"\" \"\" \"\"))(defun dim_crk_2 () (command \"-insert\" \"2.dwg\" pause \"\" \"\" \"\" \"\"))<p>我晕,服你了,不要瞎搞</p> <p>试下:</p><p>(DEFUN c:crk () <br/> (setq dcl_id (load_dialog "crk"))<br/> (new_dialog "crk" dcl_id)</p><p>(action_tile "accept" "(setq crk_done_id (get_tile\"crk_1\"))(done_dialog 1)")</p><p>(if (> crk_done_id 0)<br/> (progn <br/> (setvar "osmode" 0) <br/> (cond ((= "0" crk_done_id)<br/> (dim_crk_1)<br/> )<br/> ((= "1" crk_done_id)<br/> (dim_crk_2)<br/> )<br/> <br/> )<br/> ;(mold_res)<br/> )<br/> ) <br/> (princ)<br/>)</p> jxlsp发表于2008-11-9 16:55:00static/image/common/back.gif试下:(DEFUN c:crk () (setq dcl_id (load_dialog \"crk\")) (new_dialog \"crk\" dcl_id)(action_tile \"accept\" \"(setq crk_done_id (get_tile\\"crk_1\\"))(done_
<p>按了确定就没有反应了!再帮我看看吧!</p> <p>(DEFUN c:crk () <br/> (setq dcl_id (load_dialog "crk"))<br/> (new_dialog "crk" dcl_id)</p><p>(action_tile "accept" "(setq crk_done_id (get_tile\"crk_1\"))(done_dialog 1)")</p><p>(setq crk_done(start_dialog))<br/>(unload_dialog dcl_id)</p><p>(if (> crk_done 0)<br/> (progn <br/> (setvar "osmode" 0) <br/> (cond ((= "0" crk_done_id)<br/> (dim_crk_1)<br/> )<br/> ((= "1" crk_done_id)<br/> (dim_crk_2)<br/> )<br/> <br/> )<br/> ;(mold_res)<br/> )<br/> ) <br/> (princ)<br/>)</p> <p>非常感谢!</p> 问题又来了,帮我看一下! ding <p>提个小意见!</p><p>你这一排排的 cond看的有点晕~写出来更晕~</p><p> (cond ((= "0" gj_done_id)<br/> (dim_gj_1)<br/> )<br/> ((= "1" gj_done_id)<br/> (dim_gj_2)<br/> )</p><p> .....................</p><p>不如这样: (eval (read (strcat "(dim_gj_" gj_done_id ")")))</p><p></p>
页:
[1]
2