de.lsp-在圖上標上座標(xE,yN) G: o9 p0 }$ H, Q0 a* `
5 l9 O5 K% Q W- d# ]& ?
(defun c:de ()4 Q+ s' z% u# U& C" O# i% J, {" ~
(setvar "cmdecho" 0)
: Y; \% }# n4 @- U& D1 Y9 I (command "osnap" "end")
8 ~" N0 M8 ]; a, u3 n4 h (setq p1 (getpoint "Select line near endpoint")): I0 n* M" N% b+ h" M
(setq p2 (getpoint p1 "Select cen of Leader"))
* N" X3 f' [1 u4 m- g (setq px (rtos (nth 0 p1 ) 2 4))/ q, J& U) u$ p) }* W
(setq py (rtos (nth 1 p1 ) 2 4)); G$ P6 ]# U1 A4 q2 Q' e: W5 K; \
(setq txt (strcat "x " px " , " "y " py))) p0 J/ P, z0 X: ^& L9 P* p- j! }& u! V
(command "dim1" "leader" p1 p2 "" txt)
F. z9 r1 v7 U1 y (setvar "cmdecho" 1) @3 l4 Y2 Z3 J* D3 E
) |