请教高手lisp不能正常应用
<p>小弟最近下雨闲得无聊修改了份lisp小程序,可是tm1~tm9和图块ac50tk死活显示不出来,程序如下,请高手给予正解,谢谢</p><p>(defun c:jtk()<br/> (setq xinan (GETpoint "\n请拾取或输入1:500图框的西南图廓点坐标:"))<br/> (setq tm (getstring "\n请输入图名:"))<br/> (command "layer" "s" "tk" "")<br/> (setq x0 (nth 0 xinan) y0 (nth 1 xinan) h0 (nth 2 xinan))<br/> (setq xk (/ x0 1000))<br/> (setq yk (/ y0 1000))<br/> (setq x (rtos xk 2 2))<br/> (setq y (rtos yk 2 2))<br/> (setq tmy1 (rtos (- (atof y) 0.25) 2 2))<br/> (setq tmx1 (rtos (- (atof x) 0.25) 2 2))<br/> (setq tmyy (rtos (+ (atof y) 0.25) 2 2))<br/> (setq tmxx (rtos (+ (atof x) 0.25) 2 2))<br/> (setq th (strcat x "-" y))<br/> (setq dtk1 (polar xinan 0 257.5)) <br/> (setq dth (polar dtk1 1.570796 125))<br/> (setq dtkk (polar xinan 0 261.5))<br/> (setq dtm (polar dtkk 1.570796 125))<br/> (command "style" "winht" "simhei.ttf" "3.0" "0.8" "" "" "")<br/> (command "text" "j" "m" dtm "" tm)<br/> (command "style" "winht" "simhei.ttf" "3.0" "0.8" "" "" "")<br/> (command "text" "j" "m" dth "" th)<br/> (setq tm1(strcat tmxx "-" tmy1))<br/> (setq tm2(strcat tmxx "-" y))<br/> (setq tm3(strcat tmxx "-" tmyy))<br/> (setq tm4(strcat x "-" tmy1))<br/> (setq tm6(strcat x "-" tmyy))<br/> (setq tm7(strcat tmx1 "-" tmy1))<br/> (setq tm8(strcat tmx1 "-" y))<br/> (setq tm9(strcat tmx1 "-" tmyy))<br/> (setq dtk (polar xinan 0 250))<br/> (setq dtm1(polar dtk 0 15.5))<br/> (setq dtm2(polar dtm1 1.570796 7.5))<br/> (setq dtm3(polar dtm1 1.570796 15))<br/> (setq dtm4(polar dtk 0 11.5))<br/> (setq dtm6(polar dtm4 1.570796 15))<br/> (setq dtm7(polar dtk 0 7.5))<br/> (setq dtm8(polar dtm7 1.570796 7.5))<br/> (setq dtm9(polar dtm7 1.570796 15))<br/> (command "style" "hz" "rs.shx" "1.2" "0.8" "" "" "")<br/> (command "text" "j" "m" dtm1 "" tm1)<br/> (command "text" "j" "m" dtm2 "" tm2)<br/> (command "text" "j" "m" dtm3 "" tm3)<br/> (command "text" "j" "m" dtm4 "" tm4)<br/> (command "text" "j" "m" dtm6 "" tm6)<br/> (command "text" "j" "m" dtm7 "" tm7)<br/> (command "text" "j" "m" dtm8 "" tm8)<br/> (command "text" "j" "m" dtm9 "" tm9)<br/> (command "insert" "C:\\CASS70\\BLOCKS\\Ac50tk.dwg" xinan "xyz" "1" "1" "1" "")<br/> (command "layer" "s" "0" "")<br/> (command "redraw")<br/> (command "zoom" "e")<br/> (princ "\n * 图幅整饰完成 * ") <br/> (print )<br/> <br/>)<br/> <br/> <br/></p> <p>没细看,关掉osmode试试:</p><p>(setvar "osmode" 0)</p> <p>不行啊,程序执行完text命令后就返回了style命令,并出现函数被取消的反馈!</p><p>看了下,应该没有语法错误的阿</p>
页:
[1]