Handle program-level dialogs in batch processing

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?

Hi @jacobgerlach,

No, there is no sneaky command that controls this.

Can you provide a model and script script that repeats what you are seeing?

Thanks,

– Dale

1 Like

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.

1 Like

Missing Font Test.3dm (933.0 KB)
@dale - any program dialog can reproduce the problem:

  1. 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.
  2. 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?

I created a monitor thread that closes pop-up windows.

@gankeyu that sounds like exactly what I need, can you share?