;;;;;;;;;;;;;;;标注点的坐标;;;;;;;;;;;;;;;;;;;;; (defun c:xy3() (command "osnap" "nod,end,cen") (setq pt (getpoint "\n请选择一点:")) (command "osnap" "off")
(setq pt1 (getpoint pt "\n请选择标注的位置:")) (command "line" pt pt1 "") (setq pt2 (getpoint pt1 "\n请选择标注的方向:"))
'(setq i (getreal "\n请输入字体高度:")) (command "osnap" "off") (setq ang (angle pt1 pt2)) '(setq pt2 (polar pt ang 0.5)) (setq x (rtos (cadr pt) 2 3)) (setq y (rtos (car pt) 2 3)) (setq c1 (+ ang 1.5707963)) (setq c2 (- ang 1.5707963)) (setq pt3 (polar pt1 c2 2.5)) (setq pt4 (polar pt1 c1 0.5))
(setq a (strcat "X=" X)) (setq b (strcat "Y=" Y)) (setq le (- (* (strlen a) 2) 3)) (setq jd (/ (* 180 ang) 3.1415926)) (command "text" pt4 1.5 jd a) (command "text" pt3 1.5 jd b) (command "line" pt1 (polar pt1 ang le) "" ) )
|