Loop through and ViewCaptureToFile on 'Named Views' Panel

Hi all,
I want to loop through all the saved views on ‘Named Views’ panel. But I am not sure how to achieve it.

I know you can return the view names by using ‘rs.NamedViews()’. But I cannot find the command to set current view using view names. ‘rs.CurrentViews’ doesn’t seen like what I am looking for…

The last step would be ask python to do ViewCaptureToFile. I wonder how to predefined the file name and location so I don’t need to mannually do it for every view.

Appreciate for any suggestion.

Thanks,

Maybe have a look at this sample:

Thanks Nathan. Instead using VBScript, is that possible to resolve it via a few python lines? I think there must be some easier way. What I missing is the command to active the view/camera and the command to do an automatic ‘ViewCaptureToFile’ without any popup menu. I tried using rs.command("_ViewCaptureToFile") but don’t how to predefine all parameters like location, dpi, file name etc.
Thanks

Here a sample code to get/set active view

Here one to programmatically control view capture

1 Like

Many thanks!