de.lsp-在圖上標上座標(xE,yN)
- Y% U% r/ p( }
5 j: y, l# J/ y(defun c:de ()
' ^$ p9 V8 W H (setvar "cmdecho" 0)
; z) _ ?: d( ]% I (command "osnap" "end")
7 P* x" x. h* t# E (setq p1 (getpoint "Select line near endpoint"))
% Q$ U' J5 U2 a' b (setq p2 (getpoint p1 "Select cen of Leader"))
, o9 {" `0 l% P9 i2 N1 `+ K# g (setq px (rtos (nth 0 p1 ) 2 4))! }/ }9 W' b3 P, w9 M& V
(setq py (rtos (nth 1 p1 ) 2 4))
" T6 q, l* c' Q3 r4 l# h- f (setq txt (strcat "x " px " , " "y " py))
; H* h5 b$ z, z2 C4 Z0 ? (command "dim1" "leader" p1 p2 "" txt)- r' @5 \, i( c: f( Z& X
(setvar "cmdecho" 1)2 |7 {! r2 o- U! P; x" f$ T
) |