de.lsp-在圖上標上座標(xE,yN)' p) x5 x$ o1 s8 ]
7 h! `5 A1 {- X1 \) o6 d R4 r$ _
(defun c:de ()
8 C; y G4 o. C) O5 S (setvar "cmdecho" 0)) g7 {' {9 k: u$ p W! t
(command "osnap" "end")5 B( l6 ]3 Z- T8 H
(setq p1 (getpoint "Select line near endpoint")), M$ v+ h' ~7 N4 }0 H* k9 V& o
(setq p2 (getpoint p1 "Select cen of Leader"))
* t1 ^, Q# y- S* y (setq px (rtos (nth 0 p1 ) 2 4)) i9 N. D h, ^, P6 M% w8 ~; V! T' \
(setq py (rtos (nth 1 p1 ) 2 4))2 I5 \' S* {; w
(setq txt (strcat "x " px " , " "y " py))
4 h, T! x! b; V! }& j% K2 h+ f) P$ r (command "dim1" "leader" p1 p2 "" txt)
. _1 {5 `% t3 K* e( B (setvar "cmdecho" 1)2 y* U1 Z# M! A# D2 ]" q( M. z5 @
) |