ShapeDiver: How to have a Screenshot of the viewer?

The title is enough… but more precisely I would like to give to the user who is playing with my code the ability of exporting some screenshots of the actual view he is watching (as the option print in Rhino is doing).

For example I made this “print”/“screenshot”/“images” attached through Rhino Print command and I would like to do the same from ShapeDiver.

Which are the precise steps to do that?

Thanks a ton,
Michele.

@michele.farina if you want to get a screenshot of the scene shown in the viewer, you need to use the API function api.scene.getScreenshot() which gives you a base 64 image that can be downloaded. This function is described in the API documentation here.

Okay, thanks Edwin! Let’s say I have no skills in programming, have you got a general GH file in which you use some API function for use these in ShapeDiver?

Thanks another time,
M.

@michele.farina the API functions are not accessed in anyway via GH. If you want to make a quick test to get a Screenshot via the API, you can right click on the menu of your model in ShapeDiver, then click on inspect, then click on console and here you can type and enter api.scene.getScreenshot(). This will give you the base 64 image.