de.lsp-在圖上標上座標(xE,yN)
9 R9 C; m0 V; h, a7 V& Q2 o- ^5 e$ j, c: s. }* H2 K1 O0 @/ |
(defun c:de ()) R2 s6 W9 Z F E9 h5 m
(setvar "cmdecho" 0)
; P; N" u; y+ \+ C5 v$ l (command "osnap" "end"): e" U" b& @2 s# y ^/ T
(setq p1 (getpoint "Select line near endpoint"))! L% `" l4 o0 h
(setq p2 (getpoint p1 "Select cen of Leader"))( n" D. z% O5 g
(setq px (rtos (nth 0 p1 ) 2 4))
7 `5 Y: P0 }; D3 G4 \$ t3 _ (setq py (rtos (nth 1 p1 ) 2 4))
; v! i& A& ]& _ (setq txt (strcat "x " px " , " "y " py))
% m) Q. V" }0 I c+ l( ?" V9 C (command "dim1" "leader" p1 p2 "" txt)! z' D) d4 s3 E8 h3 _- ^0 H
(setvar "cmdecho" 1)
4 B/ O5 j# {2 V1 X& ~) |