Setting the active view with Python

Hi all,

I apologize in advance if this is a newbie question. I was trying (without much success) to set the active view automatically with python, so that when I use python to render it will always get the specific view I would like to render first, and only then run the render command.

I have found this:

But this only lets the user set the active view by CLICKING on it in the command line, while i would like to SPECIFY the view name IN THE CODE, so that when I run the code it will automatically change to that view. In pseudo code:


Does anybody have any useful insight regarding this?

Thanks in advance,


Hi Yuval,

No need to apologize; this community is for answering questions no matter what level.

does this help:

import rhinoscriptsyntax as rs

#if the view is already setup correct:

#if you need to restore a named view first:


1 Like

Hi Willem,

Thank you, it works perfectly!
I really appreciate the quick (and helpful) advice - I spent two hours of my life trying to get this done.

I hope to get my skills up so i can also help others here:)



1 Like