Select viewports one after another

Hello,

I am currently trying to write a few macros to make certain workflows easier.
In this regard i would like to select each of my 4 viewports one by one to execute viewport specific commands in them.

Is it possible to have something like “set next viewport” ? this way I could cycle through the viepords regardless of their name…

thank you for your feedback

best

Andreas

The commands are NextViewport to go “forward” and PrevViewport to go “backward”. --Mitch

thank you Mitch…

If you want to use Rhinoscript

Option Explicit

Call Main()
Sub Main()
	Dim views,viewi
	'list of all views, maybe also check NamedViews
	views =  Rhino.ViewNames()
	'loop trough views
	For Each viewi In views
		'do something with each viewi
		'for example set display mode to shaded:
		Call Rhino.ViewDisplayMode(viewi,1)
	Next
End Sub

Thank you Tom!