screenshot

Save an image of the current view to a PNG file.

Captures whichever view is showing, model or result, without the canvas quick-access toolbar.

Parameters

file_path : str
Path to the PNG file to write. Missing folders are created, and an existing file is overwritten without warning.

Examples

import os
gx.screenshot(file_path=os.path.join(os.getcwd(), "model.png"))