de.lsp-在圖上標上座標(xE,yN)8 w$ Y4 U9 Q0 N& C/ o6 t% |
% @3 k/ b, d% O- W* P$ e" Q(defun c:de ()
8 `2 i H4 p2 u6 Q3 Q4 A; A (setvar "cmdecho" 0) f! F, |* m- L
(command "osnap" "end")
* d5 V3 m) q0 I (setq p1 (getpoint "Select line near endpoint")); a5 J9 \6 g3 S& |& C2 q
(setq p2 (getpoint p1 "Select cen of Leader"))
z# w W. W+ Z6 ^! Q7 {* J (setq px (rtos (nth 0 p1 ) 2 4))' E; s' e4 Q3 Z9 c
(setq py (rtos (nth 1 p1 ) 2 4))& D. ?* Y6 l) Q3 \
(setq txt (strcat "x " px " , " "y " py))2 u9 F" H( P; ~+ E0 ^$ V8 [; J0 }
(command "dim1" "leader" p1 p2 "" txt)
: ?8 a4 Q) ~7 ~- ^6 Y6 r (setvar "cmdecho" 1)
8 K" s- k" D, P* _5 r$ q) ~) |