de.lsp-在圖上標上座標(xE,yN)
U$ H+ t4 T; q5 n3 ?# {- ?9 X" i; |) s$ P |& S7 t# R+ t
(defun c:de (). m$ z7 ]0 y! ]9 L3 b
(setvar "cmdecho" 0), A; ^% c. ?' l( d, L* r8 s% p2 | p d
(command "osnap" "end")
' l3 Y9 y4 O' \ (setq p1 (getpoint "Select line near endpoint"))
+ U. y' j" j( }1 v (setq p2 (getpoint p1 "Select cen of Leader"))6 W/ N) M+ a9 u/ L6 F+ l5 H
(setq px (rtos (nth 0 p1 ) 2 4)) K! p) h7 m0 b0 M
(setq py (rtos (nth 1 p1 ) 2 4))
7 E5 A# }2 z9 s. n (setq txt (strcat "x " px " , " "y " py)). I0 p+ U4 ?, N" F
(command "dim1" "leader" p1 p2 "" txt) a4 ?; {/ _& l& E- {
(setvar "cmdecho" 1)
0 p7 j& c2 L. y5 j- C) |