de.lsp-在圖上標上座標(xE,yN)
1 u0 H6 u. ?3 Y! A) x+ N$ R# U" H5 b" P# |* ?* r
(defun c:de ()
9 d6 D1 d3 A2 T (setvar "cmdecho" 0)
+ C! M" B! m7 A" n3 g j' C (command "osnap" "end")3 x" R( t- R/ Y1 M' ~! A
(setq p1 (getpoint "Select line near endpoint"))
0 a% g; H* Y) Q* m0 P (setq p2 (getpoint p1 "Select cen of Leader"))
8 m" P! O1 c# w7 ` (setq px (rtos (nth 0 p1 ) 2 4)): j' T: a" t" |0 h
(setq py (rtos (nth 1 p1 ) 2 4))
1 ^& P, P3 x, |/ l2 L. I (setq txt (strcat "x " px " , " "y " py))
; g* K( y" b3 _9 J+ s5 |$ l8 [, h (command "dim1" "leader" p1 p2 "" txt)
9 y4 _) G+ B' N9 h (setvar "cmdecho" 1) `# A& F- b9 [9 k( r& E
) |