Restoring snapshots in Python

Hello all,
I’m trying to write a script that restores different snapshots (elevation of clipping plane and object visibility) and saves a screencapture of each snapshot to file.

I’ve found the relevant API, but am still not sure how to do this in Pyhon.

I know how to run ViewCaptureToFile() as rs.Command(), but would greatly appreciate any help with the snapshots.
Thank you

Hi Axa,

this might get you on track:

import rhinoscriptsyntax as rs
import scriptcontext as sc

snapshot_table = sc.doc.Snapshots
for ssname in snapshot_table.Names:
    print ssname
    rs.Command('-Snapshots Restore "{}" _Enter _Enter'.format(ssname))


Brilliant! Yes, this does help a lot. Thanks, Willem.