Enscape Scipting (python rhinoscript)


Does anyone know if there is a way to automatically open up enscape through a python script, take a screenshot of the selected view and exit.

Ideally I want to have a series of options on different layers, loop through a series of options and views to to open a layer, launch enscape, take a camera shot and save a shot to an external folder.

I cant see any enscape documentation.


Without knowing enscape, just as a more general solution:

You can always access user32.dll over ctypes library and simulate mouse clicking and keyboard input. Furthermore you can toggle which window handle is on topmost. This way you can simulate a bunch of manual inputs. Basically you can copy directly from stack overflow forum entries. The tricky part is the timing.
Alternativly a software called AutoIt does this kind of stuff as well.

Shouldn’t it be just a matter of scripting the Enscape render command? First set a specific view as active view, then run the enscape render command. To find out what that is just mouse over the enscape render button, hold shift and press the right mousebutton. You’ll get the button editor dialog from which you can copy the macro used to render with enscape.

Hi Nathan,

Thankyou for your feedback.

I dont believe that enscape the program allows for scripting, but if its living within the rhino ecosystem I imagine it would work?

This wouldnt be rhino script though would it, within python how do you just call the typical commands? Excuse my ignorance but do I put the marco as part of the python script?


You can execute macros from Python. See for instance:

1 Like