de.lsp-在圖上標上座標(xE,yN)# ?2 L" D! j% f
! w$ c, x; W" G" }9 Z(defun c:de ()8 H' e \6 i# Y5 r0 d
(setvar "cmdecho" 0)
5 |+ t4 ?: J& G( N& a3 ^7 j (command "osnap" "end"); G# W" q9 P6 q$ K! x) ~
(setq p1 (getpoint "Select line near endpoint"))
) n( c [" B3 x+ u5 D% D$ \ (setq p2 (getpoint p1 "Select cen of Leader"))
1 A, }. f' T9 w/ R: c9 [ (setq px (rtos (nth 0 p1 ) 2 4))
9 T; r4 H3 C- O4 j; K* T6 y# ? (setq py (rtos (nth 1 p1 ) 2 4)); b; y% o! V' b" Y
(setq txt (strcat "x " px " , " "y " py))& e/ U Z4 s: P/ V# J
(command "dim1" "leader" p1 p2 "" txt)
7 I8 }) ]1 b7 z+ D (setvar "cmdecho" 1)5 w2 g0 I- q. m/ P& G6 R1 w
) |