I am trying to batch process a list of Rhino files. Rhino is one step in a longer processing chain, so I’m trying to use a .bat script to launch rhino with /runscript="-RunPythonScript…".
I’m running the dashed version of rhino commands to prevent dialogs from those commands, but program/file level dialog boxes sometimes interfere - for example, asking about missing font handling, or updating Rhino.
Are there any scriptable commands to catch and interact with these dialogs, or perhaps an undocumented command-line switch to make Rhino behave differently?
You could try using Rhino.Inside CPython as an alternative approach. When running in CPython, Rhino is running in a headless mode and will try to skip showing dialogs.
This test file contains an annotation style that uses a font no longer found. Works to reproduce the problem as long as you don’t have that font.
Open a file that’s already opening (causing read only dialog box)
Rhino does not process the /runscript argument until the dialog is closed. For example:
“C:\Program Files\Rhino 7\System\Rhino.exe” /runscript=“-exit” “Missing Font Test.3dm”
Rhino does not exit until I acknowledge the font substitution
@stevebaer thanks for the suggestion, this looks pretty exciting. I might redo the whole workflow in Python someday, but for now I’m sticking with a batch script. This is probably a naive question, but is there a simple wrapper for Rhino.Inside that could let it run headless from a command prompt?