(defun C:COORD (/ up xypt x$ y$ z$)
 (setvar "orthomode" 0)
 (setq up (list 0 0 0))
 ;-------------------------------------------
 (defun set00 ()
  (setq #00 (getpoint "\nSelect 0,0 point: "))
 )
 ;-------------------------------------------
 (if (null #00)(set00))
 (if (null (tblsearch "BLOCK" "noarrow"))(command "insert" "noarrow" nil))
 (command "dim1" "dimblk" "noarrow")
 (while up
  (initget "R")
  (setq up (getpoint "\nReset/<select point>: "))
  (cond
    ((= up "R")
      (set00))
    ((null up)(progn (command "dim1" "dimblk" ".")(prin1)))
    (T
     (progn
      (setq xypt (getpoint up "\nText location:"))
      (setq x$ (rtos(-(car up)(car #00)))
            y$ (rtos(-(cadr up)(cadr #00)))
            z$ (rtos(-(caddr up)(caddr #00)))
      )
      (command "dim1" "leader" up xypt "" (strcat x$ "," y$ "," z$))
     )
    )
  )
 )
(print)
)

