de.lsp-在圖上標上座標(xE,yN)" ]& u: e* w: h* y) H
k( f- ^9 Q+ ?- n' r, {7 e' b
(defun c:de ()
' R* y: p: x& F; w5 c } (setvar "cmdecho" 0), \" {+ |' `* m4 {6 | g
(command "osnap" "end")* n' |) G* _! @' I
(setq p1 (getpoint "Select line near endpoint"))1 W) P7 U1 U7 O9 I
(setq p2 (getpoint p1 "Select cen of Leader"))3 Y) S1 N. N3 `, Q. ?; r
(setq px (rtos (nth 0 p1 ) 2 4))
7 \: D6 c: X$ Q! l {% U (setq py (rtos (nth 1 p1 ) 2 4))' P. g: M5 f D l: y
(setq txt (strcat "x " px " , " "y " py)). l( b" F! G8 y$ C( o/ `! O) k) S
(command "dim1" "leader" p1 p2 "" txt)
! L6 O2 h: y( P* r* W! R (setvar "cmdecho" 1)
7 {6 c7 I; A: B. U) [) |