Definitely: not possible.
At least with my version of AutoCAD.
Any line of code after the new drawing is created will not be executed in it.
If zoomExtents is so important, you should consider an indirect solution (which I've never tried, but which may be possible): write a LISP in 'acad.lsp' so that it does a 'zoomExtents' when each drawing is opened.
Perhaps someone can share their experience in this regard.
Hi @maahee,
Try with this:
(setq ln (ssget "_F" pts '((0 . "LINE") (-4 . "<NOT") (-4 . "<OR") (62 . 1) (62 . 5) (62 . 256) (-4 . "OR>") (-4 . "NOT>"))))
This will reject selecting "LINE" entities which are colored in red, blue and bylayer (62 . 256) (bylayer present that LINE which cross over the red and blue LINE's).
Use this reference to all "ssget" function reference: ssget.