Why won't the following code turn on all the viewports in a drawing? Do I have to cycle through each tab for it to work?
(defun c:allon (/ ss index obj)
(if (setq ss (ssget "x" '((0 . "VIEWPORT") (-4 . "<>") (69 . 1))))
(progn
(setq index -1)
(while (< (setq index (1+ index)) (sslength ss))
(setq obj (ssname ss index)
obj (vlax-ename->vla-object obj)
)
(vla-put-ViewportOn obj :vlax-true)
)
)
)
)
Thanks,
Ron