de.lsp-在圖上標上座標(xE,yN)# U) R/ g' S" k9 Y( V) A, z9 \8 e
3 r5 f7 j' C: W- }9 r p
(defun c:de ()% Z0 ^# W( e* a2 G
(setvar "cmdecho" 0)& z! Q8 P2 n" K" b; w
(command "osnap" "end")
! p" R' M7 ]1 c1 Z6 q (setq p1 (getpoint "Select line near endpoint"))
& y# e( ~% r0 s3 i (setq p2 (getpoint p1 "Select cen of Leader"))* `! f0 Y- ]+ ~# ] h2 K
(setq px (rtos (nth 0 p1 ) 2 4))4 s! Y8 x8 B) J
(setq py (rtos (nth 1 p1 ) 2 4))
6 Z4 Z, g; h9 d7 r0 y% j (setq txt (strcat "x " px " , " "y " py))
+ |7 c/ \" q4 K* a3 E+ k5 M2 O (command "dim1" "leader" p1 p2 "" txt)
# j7 r7 |$ O% F; p8 z& I (setvar "cmdecho" 1)
3 L: w7 B0 w# D' Z/ ~: b) |