;計測した座標値を右側に右側に旗上げ
;+++++++++++++
(Defun C:CODE02 ( / 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" "ML"  "@0,0"
                   (Strcat "X=" Xp) (Strcat "Y=" Yp) ""
                   "Grips" "2"
                   "Ucs" "p")
    (princ)
)