CODE03:計測した座標値を左側に旗上げ
2023年05月09日
;+++++++++++++
(Defun C:CODE03 ( / Xp Yp )
;+++++++++++++
(Command "OsnapCoord" "1" "-Layer" "M" "FlagID" "" )
(setq Pt (getpoint "\n計測する位置を指定:"))
(Command "ID" Pt)
(Command "Grips" "2")
;+++++++++++++
(setq Xp (car (getvar "Lastpoint")))
(setq Yp (cadr (getvar "Lastpoint")))
(setq Xp (rtos Xp ))
(setq Yp (rtos Yp ))
;+++++++++++++
(Command "Ucs" "w" "-MText" "@" "J" "MR" "@0,0"
(Strcat "X=" Xp) (Strcat "Y=" Yp) ""
"Grips" "2"
"Ucs" "p")
(princ)
)