de.lsp-在圖上標上座標(xE,yN)7 ~# K# s( m {
* K* E' q( ?1 S7 t2 E(defun c:de ()' x+ e* D8 O. \
(setvar "cmdecho" 0)
: D4 L+ {- a% K& E (command "osnap" "end")
# x8 s5 g- u* ^: `* Z+ E: J! v (setq p1 (getpoint "Select line near endpoint"))
/ I4 @9 w: i: A2 q4 u9 i7 N! {$ F (setq p2 (getpoint p1 "Select cen of Leader"))
]6 a/ u6 ? { P0 {1 u (setq px (rtos (nth 0 p1 ) 2 4))1 N3 y0 g+ B7 ]3 S. ^- X' g* `5 p! g
(setq py (rtos (nth 1 p1 ) 2 4))1 w |! [* H: C% R
(setq txt (strcat "x " px " , " "y " py))
) M( t: n1 @: V (command "dim1" "leader" p1 p2 "" txt)7 l, h4 Y+ H% t
(setvar "cmdecho" 1)
& w% f( e' k! Y- S4 }, N" ~& K) |