de.lsp-在圖上標上座標(xE,yN); D( b: j6 P" h1 ]5 D
u$ Y1 E- j1 Z* D
(defun c:de ()
- ^# ~& t; `7 F' r (setvar "cmdecho" 0): r( l0 S* M5 f- t o
(command "osnap" "end")
" Z: T5 P# z# y4 c9 z) Z1 L (setq p1 (getpoint "Select line near endpoint"))
" A8 ]- \- M/ W& d Z x (setq p2 (getpoint p1 "Select cen of Leader"))
' }. H& g! _" z! g+ [( I (setq px (rtos (nth 0 p1 ) 2 4))
; J. |' v. b4 M" D6 ?8 Z* v (setq py (rtos (nth 1 p1 ) 2 4))
N9 P* b* F1 z; n! K F# S (setq txt (strcat "x " px " , " "y " py))+ h1 W. E; f5 m
(command "dim1" "leader" p1 p2 "" txt)
- \7 o4 R+ a( ?* C7 B; M* X& t; u4 h+ G& s (setvar "cmdecho" 1), L1 w6 A3 P. i# j
) |