This code is a simple way to do it, but unless you have a really big drawing it will go so fast that you won't get to enjoy it unless you put in a delay.
Edit: Added in the delay function, then used (vla-ZoomWindow) method and a then a (redraw), and set the delay to about 200 msec.
(defun pjk-delay (sec / elsp dt secs)
(setq dt (getvar "DATE") secs (* 86400.0 (- dt (fix dt))))
(while dt
(setq dt (getvar "DATE") elsp (* 86400.0 (- dt (fix dt))))
(if (or (< (- elsp secs) 0.0)(>= (- elsp secs) sec))(setq dt nil))
)
(princ)
) ;; End Function (pjk-delay)
(defun c:plga (/ a b ao ss n n1 pl)
(setq ao (vlax-get-acad-object))
(if (setq ss (ssget "_X" '((0 . "*POLYLINE") (-4 . "<NOT") (-4 . "&") (70 . 128) (-4 . "NOT>"))))
(repeat (setq n (sslength ss))
(setq pl (vlax-ename->vla-object (setq n1 (ssname ss (setq n (1- n)))))); added variable "n1" to get ename.
(if (and (= (logand (cdr (assoc 70 (tblsearch "layer" (vla-get-Layer pl)))) 4) 0)
(/= (vla-get-ObjectName pl) "AcDb3dPolyline"))
(Progn
(redraw)
(vla-getboundingbox pl 'a 'b)
(vla-zoomwindow ao a b)
(redraw)
(vlax-put pl 'LinetypeGeneration -1)
(pjk-delay 0.2)
)
)
)
)
(princ)
)