Vla-SendCommand() can be a replace.
Below, it is a code I wrote for a friend Walt Engle APR-04-2006, see if helps.
;; save this on your personal.mnl, that is what I normally do...
(vl-load-com)
;; get the active document
(if (not this_dwg)
(setq this_dwg (vla-get-activedocument (vlax-get-acad-object))))
;; callback function for the beginclose event
(defun beginclose (reactor params)
;; purge all - here do your mojo
(vla-purgeall this_dwg)
;; zoom extents - do more mojo
(vla-zoomextents acad_obj)
;; re-save to keep the last extents - save the mojo
(vla-save this_dwg))
;; make the reactor once
;; and using the beginclose event
;; and notify the reactor to the active document
(if (not dwg_reactor)
(setq dwg_reactor
(vlr-pers
(vlr-set-notification
(vlr-dwg-reactor
"drawing reactor"
'((:vlr-beginclose
.
beginclose)))
'active-document-only))))
(princ)