Start Rhino With Enhanced Event Logging

Hi everyone,

I’m working on a script that runs rhino from the command line on a server machine and makes it run a number of things, and I need to get feedback on the status, license, etc…

I’m looking for something like this but for windows:

https://wiki.mcneel.com/rhino/mac/startupwithlog

Is there anything similar?

Hey @Pitti,

If you are looking for a logging mechanism, the Rhino API doesn’t have one available for use - you’ll need to make one up yourself.

Or are you looking for something else?

– Dale

Hey @dale

I would like to give the users information about what’s going on, Since they are running the script from their local machine, they won’t see rhino viewport on the screen.
Sometimes the script can take 1 minute to run, other times (in case of huge files) can take longer and also get stuck for several reasons, so I would like to give feedback like:
Rhino started - license is ok - process 1 started - process 1 done - and so on and so on…
And this can be also useful for me to get track of where the script is having problems…

This is done with Rhino.Compute. When Rhino is started headless many events are logged to the console. You may want to look at the following functions in RhinoCommon

RhinoApp.CommandWindowCaptureEnabled
RhinoApp.CapturedCommandWindowStrings

RhinoApp.SendWriteToConsole

The first two allow you to capture event strings and then do whatever you want to with them. The third simply sends the strings to the console output.

2 Likes