Here's an excerpt taken from CAB's 'VPLockAll',
(if (= (vla-get-objectname ent) "AcDbViewport")
(progn
(vla-put-displaylocked ent lck)
(vla-put-color ent clr)
(if (setq obj (assoc 340 (entget (vlax-vla-object->ename ent))))
(vla-put-color (vlax-ename->vla-object (cdr obj)) clr2)
)
); end progn
)
I know the viewport is accessed and it is locked or unlocked, and the color is changed depending on the scenario, but this is the only manner I have seen so far in modifying viewports.