de.lsp-在圖上標上座標(xE,yN)
3 o \3 Z; N9 v* M, e0 Q
4 Q# c3 w3 ^3 t4 `: X3 K# n(defun c:de ()
0 S3 m; X5 B% O- ^0 M (setvar "cmdecho" 0); e) X; r5 @: j V
(command "osnap" "end")' z1 p& a% {* }$ B3 M0 j
(setq p1 (getpoint "Select line near endpoint"))
! v2 i* S; q* t' b* W3 ~% u Z (setq p2 (getpoint p1 "Select cen of Leader"))5 @5 K' L4 b0 f$ H: u# g+ |$ Z4 i: x
(setq px (rtos (nth 0 p1 ) 2 4))
9 J3 |0 b* V- K' P1 [ (setq py (rtos (nth 1 p1 ) 2 4))
# k j' a% }: T5 Q" m3 v* C. e/ p (setq txt (strcat "x " px " , " "y " py))6 c R7 w$ d) r7 c( d
(command "dim1" "leader" p1 p2 "" txt)6 B% c1 R$ k& D9 \( P1 l2 K
(setvar "cmdecho" 1)
! O' s+ ?: b- h2 W- ~* `) |