de.lsp-在圖上標上座標(xE,yN)/ }* Y! E9 d( x) F- k/ N, k
0 S. Q( ~2 }( N! U+ k
(defun c:de ()2 U1 G7 F5 ]* r! t
(setvar "cmdecho" 0)0 |: j' Z) `* o2 t& D
(command "osnap" "end"), ]/ V7 Z6 k! [7 A, G; ]
(setq p1 (getpoint "Select line near endpoint"))
- o' d( e; S0 S( \$ X; t6 [# c (setq p2 (getpoint p1 "Select cen of Leader"))
: y! t+ x6 h- Z6 X! \$ V. \ (setq px (rtos (nth 0 p1 ) 2 4))
' H0 \) ?8 g! o( t7 P7 o# x (setq py (rtos (nth 1 p1 ) 2 4))
" ]) K# Z( [" `6 ` (setq txt (strcat "x " px " , " "y " py)). ^/ \' f& p6 {7 s
(command "dim1" "leader" p1 p2 "" txt)
% S5 e1 k) `: X# f1 R (setvar "cmdecho" 1)
: T0 X; h# z O& u( c N R/ s) |