Are you talking about setting the UCS to the face of your object?
Your profile says you're using a pre 2000 version of Autocad, so maybe that's why the axis moves with the object? That doesn't happen in newer versions. I can set the UCS to the face of an object, but when I move the object, the axis stays where I set it. It doesn't move.
Look at this example (startapp "C:/Program Files (x86)/Adobe/Acrobat Reader DC/Reader/AcroRd32.exe" filename)
Or do you mean
(command "-pdfattch" filename pagenumber pt 1 0)
Also try this.
(defun C:TEST ()
(setq SEL (ssadd))
(initget "S L C")
(setq a (entsel "\nSelect objects, or by [style/Layer/Color]...:"))
(if (= a "S")
(progn
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
)
)
(if (= a "L")
(progn
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
)
)
(if (= a "S")
(progn
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
)
)
(if (and (/= a nil)(/= a "S")(/= a "L")(/= a "C"))
(progn
(setq SEL (ssadd (car a) SEL))
(command "_select" SEL pause)
(setq SEL (ssget "_P"))
)
)
(if (= a nil)
(progn
(command "_select" "_BOX" (cadr (grread T)) pause)
(setq SEL (ssget "_P"))
)
)
)