Welcome to the forum chan_ou!
Try this:
Code:
(defun C:pCoords (/ cmd p1 x y z)
(initget 1)
(setq p1 (getpoint "\nSelect point: "))
(if (eq (type p1) (quote LIST))
(progn
(setq x (cond ((getreal (strcat "\nNew X point coordinate <" (rtos (car p1) 2 8) ">: "))) ((car p1))))
(if x
(progn
(setq y (cond ((getreal (strcat "\nNew Y point coordinate <" (rtos (cadr p1) 2 8) ">: "))) ((cadr p1))))
(if y
(progn
(setq z (cond ((getreal (strcat "\nNew Z point coordinate <" (rtos (caddr p1) 2 8) ">: "))) ((caddr p1))))
(if (and z (not (equal p1 (list x y z) 1e-8)))
(progn
(setq cmd (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(command "_.UCS" "_Origin" (mapcar (function -) p1 (list x y z)))
(setvar "CMDECHO" cmd)
)
)
)
)
)
)
)
)
(princ)
) ;;C:pCoords