Events and snapshots

HI, I’m trying to figure out some way to my script be aware of when the user is messing around with snapshot (in my current problem I need to be aware if the user has fired up snapsphots “Restore” button since I need to take care of additional scene states related to third party plugins that currently snapshot is not supporting.

So far, I didn’t found any events related to snapshot. Did I miss something? Is it any plans to implement events for snapshots?

I would like to hear what would be the best way to solve the problem I described earlier?


Well actually I did found something that seems has potential, i’m referring to IsCurrentModelStateInAnySnapshot Method. but I would need to see some sample to see how are handled BinaryArchiveReader and SimpleArrayBinaryArchiveReader. Apparently, each snapshot is saved in a binary file, but I couldn’t figure out where I need to look for them. Is this right? If so, is it possible to access them using Rhinocommon and make something usefull with them?

I’m also quite confused with RhinoDo’s snapshot table. Is just exposing and function to retrieve the document where the table is “living” and other method for obtaining an array of snapshot names. No “Find” methods to retrieve a snapshot in the table as is common in other tables, nothing I found as “usefull” method…

Perhaps the answer to all this confusion is simply that “snapshots” are not scriptable…yet?

No, snapshots are stored in the document.

SnapShotsClient is an interface that allows plug-ins to participate in snapshot data saving and restoring.

The SnapshotTable, returned by the RhinoDoc.Snapshots property, provides some details about the snapshots saved by the user. You are correct, the table doesn’t provide much functionality. However, the _-Snapshots command is scriptable.

Hope this helps.

– Dale

Thanks for the explanation @dale.

In relation to apparently unexisting snapshot events, is Rhinocommon exposing any method that could handle my python script need of being aware on when the user is fireing up the snapshot’s “restore” method?

I could create and command that launchs and scripted snapshot, and then execute the rest of action than I need for setting up the rest of document states that snapshot doesn’t currently support, but this way the user would be loosing all the UI goodness that snapshot has implemented. I certainly could recreate all that UI staff, but this feels to me as being reinventing the wheel…

Any idea would be wellcomed…


@andy, anything you can add here might be helpful.

1 Like

No, I don’t think there is anything, other than using OnBeginCommand and OnEndCommand to check whether you are unsure the Snapshots command.

1 Like

thank @andy, I will try to implement using those handlers. Apriori seems a solution to my problem if this way I’m able to figure out which of the snapshot has been restored/saved.

let’s try this. Thanks!