de.lsp-在圖上標上座標(xE,yN), C( P- @2 N0 N! A4 w2 y
: `* v- y3 r" c
(defun c:de ()
. N. U5 z" Z3 y: V5 D* z (setvar "cmdecho" 0)
6 J& q* q7 Y! V (command "osnap" "end")4 J( q: o! p2 u
(setq p1 (getpoint "Select line near endpoint"))
3 } u% ^$ a! {2 m4 M2 d (setq p2 (getpoint p1 "Select cen of Leader"))
# q: H1 I ~' q (setq px (rtos (nth 0 p1 ) 2 4))7 E- v# |- |3 m( S. D2 c2 \% l
(setq py (rtos (nth 1 p1 ) 2 4))
8 T) P$ _+ V0 B6 k (setq txt (strcat "x " px " , " "y " py))
! a Q( n! }7 T: f/ `- H (command "dim1" "leader" p1 p2 "" txt)0 J, [* F2 \8 g
(setvar "cmdecho" 1)
* B/ `$ ?8 O& m0 R8 W" u, a3 m) |