de.lsp-在圖上標上座標(xE,yN)1 j4 C$ a" x0 D
6 K: n5 N+ W7 K( w! o
(defun c:de ()
, q/ B; N$ R' e (setvar "cmdecho" 0)
0 a0 C6 t, T& C# _ (command "osnap" "end")
4 [: f, [' A6 y; T, A6 j (setq p1 (getpoint "Select line near endpoint"))6 T: k: ?9 d8 ^; k8 n5 o, U/ ]
(setq p2 (getpoint p1 "Select cen of Leader"))* f: j$ A2 C1 ^+ ] N; h' s
(setq px (rtos (nth 0 p1 ) 2 4))
# b( B# W) h9 t3 ~* a1 Y. e f0 Q (setq py (rtos (nth 1 p1 ) 2 4))
2 y) D' o& y2 A$ U& e1 W (setq txt (strcat "x " px " , " "y " py))& p/ }8 U8 _) F/ M% R1 P
(command "dim1" "leader" p1 p2 "" txt)
2 V+ }& O9 {2 O' N4 d' t6 d (setvar "cmdecho" 1)- n8 f d. W2 u! @. q. h9 I
) |