在这个论坛找到的下面的内容:
把下面的lisp文件load,输入zbb,就可以了
;1.标注大地坐标. (defun c:ZBB() (setq pi 3.14159265359) (setq TEXT_H (getvar "USERR1")) (setq REPLY (strcat "\nEnter text height <" (rtos TEXT_H 2 3) ">:")) (setq T_H (getreal REPLY)) (if (/= T_H nil) (setvar "USERR1" T_H) (setq T_H TEXT_H)) (setvar "OSMODE" 32) (setq p1 (getpoint "\nint-point:" )) (setvar "OSMODE" 0) (setq n1 (nth 1 p1)) (setq e1 (nth 0 p1)) (setq nn (rtos n1 2 3)) (setq ee (rtos e1 2 3)) (setq nn (strcat "X_" nn)) (setq ee (STRCAT "Y_" ee)) (setq p2 (getpoint "\nsecond point:" )) (setq fw (angle p1 p2)) (setq fw1 (/ pi 2)) (setq fw2 (/ (* pi 3) 2)) (if (and (> fw fw1) (< fw fw2)) (progn (setq pe (polar p2 (* pi -1) (* 7.5 T_H))) (setq pt (polar pe 0 0))) ;else------------------------ (progn (setq pe (polar p2 0 (* 7.5 T_H))) (setq pt (polar p2 0 T_H))) );end if---------------------------- (setq p3 (polar pt fw1 (* T_H 0.5))) (COMMAND "text" p3 T_H "0" nn) (setq p3 (polar pt fw2 (* T_H 1.5))) (command "text" p3 T_H "0" ee) (command "pline" p1 p2 pe "") (setvar "osmode" 35) ) ;End of ZBB().
|