de.lsp-在圖上標上座標(xE,yN)9 I& I; ~% s9 h _& ]; a7 D$ T! x
% _. W, z, J. M6 C7 E(defun c:de ()6 d) ]) P1 t6 N: ~+ p
(setvar "cmdecho" 0)
% j9 d: b/ W- q5 _0 T (command "osnap" "end")
0 C& d2 d. L. V H# { (setq p1 (getpoint "Select line near endpoint"))6 a. _5 Z% D1 t, z
(setq p2 (getpoint p1 "Select cen of Leader"))
5 {' h; X# T& s5 R# O2 K (setq px (rtos (nth 0 p1 ) 2 4))
6 K8 X: f, K% l2 z (setq py (rtos (nth 1 p1 ) 2 4))
! R4 g5 w+ f2 U0 |( B Q, ~+ Y# }4 T (setq txt (strcat "x " px " , " "y " py))
6 {/ Q. g9 n; h& O: n) \2 F (command "dim1" "leader" p1 p2 "" txt)
- W6 |! P# c5 L! T (setvar "cmdecho" 1)
; k" J+ @2 g' k0 Q/ D9 Q) |