Here is a link that may help...
http://www.cadtutor.net/forum/showthread.php?39132-Cycling-Through-Viewports
The lisp there is as follows... haven't tested it, but could get you on the right track... similar issue...
(defun vpactivate ( width / ss avp)
;;; width [real] - viewport width for activate
;;; Usage
;;; (VPACTIVATE 199)
;;; Activate VIEWPORT with width 199
;;; Return number (for CVPORT command) VIEWPORT in layout or nil
(vl-load-com)
(if (setq SS (ssget "_X" (list '(0 . "VIEWPORT") '(-4 . "/=") '(68 . 1)(cons 410 (getvar "ctab")))))
(progn
(foreach vp (vl-remove-if (function listp)
(mapcar (function cadr) (ssnamex ss)))
(if (equal (cdr(assoc 40 ;_Width code. Height code - 41
(entget vp)
)
)
width
1e-6
)
(progn
(setq avp (cdr(assoc 68 (entget vp))))
(command "_MSPACE" "_CVPORT" avp "_PSPACE")
)
)
)
)
)
avp
)