de.lsp-在圖上標上座標(xE,yN)& b h) K5 l- G# h7 N% X
% ?/ y. h+ `. V& L
(defun c:de ()2 v4 A# f9 o9 h" y
(setvar "cmdecho" 0)4 ]$ }7 V- I& O. Y
(command "osnap" "end")
' E8 U* A6 C1 D- t4 m (setq p1 (getpoint "Select line near endpoint"))
3 I8 p! A6 l" f) L (setq p2 (getpoint p1 "Select cen of Leader"))
, z* e* {7 O1 b5 I _4 S; d2 K (setq px (rtos (nth 0 p1 ) 2 4))$ L7 `2 x" X3 r+ Q, k8 r1 x
(setq py (rtos (nth 1 p1 ) 2 4))
4 \2 M! u, v' E9 e (setq txt (strcat "x " px " , " "y " py))7 m y! s; {4 e- B
(command "dim1" "leader" p1 p2 "" txt) O7 }; _: N* ^# B! T# @: n# K
(setvar "cmdecho" 1)$ O ~. E. } _. _. c
) |