de.lsp-在圖上標上座標(xE,yN), ^; L4 r& P8 t# I0 `
# z# y1 H- H) I# @+ \
(defun c:de ()
1 Z/ g6 x8 X- N2 @' N* O (setvar "cmdecho" 0)
! a, a" \: U @ (command "osnap" "end") e5 y* ^7 R' Z) I& n" o$ Y+ Q
(setq p1 (getpoint "Select line near endpoint"))! R$ u' q2 M4 M( y E, k9 o
(setq p2 (getpoint p1 "Select cen of Leader"))
/ @( T7 C+ ]$ L9 n, E2 B2 ~ (setq px (rtos (nth 0 p1 ) 2 4))
5 _6 R1 a* c! p5 `/ \0 U& }) l (setq py (rtos (nth 1 p1 ) 2 4)); q B0 S& w% ]/ _$ Y0 ~5 s
(setq txt (strcat "x " px " , " "y " py))! J6 \, I: E9 B+ e' @4 A2 f
(command "dim1" "leader" p1 p2 "" txt)
9 A2 g4 U0 g6 t# L- Q% ] (setvar "cmdecho" 1)
s; x# v0 U0 l' o6 [( g) |