小弟最近下雨闲得无聊修改了份lisp小程序,可是tm1~tm9和图块ac50tk死活显示不出来,程序如下,请高手给予正解,谢谢 (defun c:jtk() (setq xinan (GETpoint "\n请拾取或输入1:500图框的西南图廓点坐标:")) (setq tm (getstring "\n请输入图名:")) (command "layer" "s" "tk" "") (setq x0 (nth 0 xinan) y0 (nth 1 xinan) h0 (nth 2 xinan)) (setq xk (/ x0 1000)) (setq yk (/ y0 1000)) (setq x (rtos xk 2 2)) (setq y (rtos yk 2 2)) (setq tmy1 (rtos (- (atof y) 0.25) 2 2)) (setq tmx1 (rtos (- (atof x) 0.25) 2 2)) (setq tmyy (rtos (+ (atof y) 0.25) 2 2)) (setq tmxx (rtos (+ (atof x) 0.25) 2 2)) (setq th (strcat x "-" y)) (setq dtk1 (polar xinan 0 257.5)) (setq dth (polar dtk1 1.570796 125)) (setq dtkk (polar xinan 0 261.5)) (setq dtm (polar dtkk 1.570796 125)) (command "style" "winht" "simhei.ttf" "3.0" "0.8" "" "" "") (command "text" "j" "m" dtm "" tm) (command "style" "winht" "simhei.ttf" "3.0" "0.8" "" "" "") (command "text" "j" "m" dth "" th) (setq tm1(strcat tmxx "-" tmy1)) (setq tm2(strcat tmxx "-" y)) (setq tm3(strcat tmxx "-" tmyy)) (setq tm4(strcat x "-" tmy1)) (setq tm6(strcat x "-" tmyy)) (setq tm7(strcat tmx1 "-" tmy1)) (setq tm8(strcat tmx1 "-" y)) (setq tm9(strcat tmx1 "-" tmyy)) (setq dtk (polar xinan 0 250)) (setq dtm1(polar dtk 0 15.5)) (setq dtm2(polar dtm1 1.570796 7.5)) (setq dtm3(polar dtm1 1.570796 15)) (setq dtm4(polar dtk 0 11.5)) (setq dtm6(polar dtm4 1.570796 15)) (setq dtm7(polar dtk 0 7.5)) (setq dtm8(polar dtm7 1.570796 7.5)) (setq dtm9(polar dtm7 1.570796 15)) (command "style" "hz" "rs.shx" "1.2" "0.8" "" "" "") (command "text" "j" "m" dtm1 "" tm1) (command "text" "j" "m" dtm2 "" tm2) (command "text" "j" "m" dtm3 "" tm3) (command "text" "j" "m" dtm4 "" tm4) (command "text" "j" "m" dtm6 "" tm6) (command "text" "j" "m" dtm7 "" tm7) (command "text" "j" "m" dtm8 "" tm8) (command "text" "j" "m" dtm9 "" tm9) (command "insert" "C:\\CASS70\\BLOCKS\\Ac50tk.dwg" xinan "xyz" "1" "1" "1" "") (command "layer" "s" "0" "") (command "redraw") (command "zoom" "e") (princ "\n * 图幅整饰完成 * ") (print ) )
|