The following offers another method using a temporary saved view - the advantage being that the user can adjust the view plane in addition to zooming & panning:
(defun c:test ( / *error* doc idx obj vpo vwc vwn )
(defun *error* ( msg )
(if (and (= 'vla-object (type obj)) (vlax-write-enabled-p obj))
(vla-delete obj)
)
(if (and msg (not (wcmatch (strcase msg t) "*break,*cancel*,*exit*")))
(princ (strcat "\nError: " msg))
)
(princ)
)
(setq doc (vla-get-activedocument (vlax-get-acad-object))
vwc (vla-get-views doc)
idx 0
)
(while (itemp vwc (setq vwn (strcat "$temp" (itoa (setq idx (1+ idx)))))))
(setq obj (vla-add vwc vwn)
vpo (vla-get-activeviewport doc)
)
(foreach prp '(center direction height target width)
(vlax-put-property obj prp (vlax-get-property vpo prp))
)
(getpoint "\nPan & zoom around...")
(vla-setview vpo obj)
(vla-put-activeviewport doc vpo)
(*error* nil)
(princ)
)
(defun itemp ( col key )
(not (vl-catch-all-error-p (vl-catch-all-apply 'vla-item (list col key))))
)
(vl-load-com) (princ)