How to write a message in the command line window?

I would like to write a message in the command line window (not in the command history window) in a similar fashion as some commands do, for example: “Meshing… Pres Esc to cancel”.

I found a Write function which uses UnsafeNativeMethods.CRhinoApp_Print(), but I would like to find an easy to use method. I think SetCommandPrompt is not a solution either. Do you know a way to do it?


Rhino.RhinoApp.SetCommandPrompt is the magic.

Thanks for your answer, Dale.
It’s the first thing I tried, but I don’t know how to print it in normal face (not bold face) and without the trailing colon.

Hi Jordi,

Looks like Rhino is calling a different function to set the command prompt in the manner you’d like. This function is not exposed in RhinoCommon in Rhino 5. But it will be exposed in Rhino 6.

Thanks, Dale. I’ll wait…

Is there a way to clear the command prompt line? Do I need to call SetCommandPrompt with a long string of blank characters?
Thank you,

Call Rhino.RhinoApp.SetCommandPrompt and pass a null string.

Thank you Dale, but that doesn’t seem to work. I still end up with extraneous text trailing the new command prompt.

My code is as follows:

RhinoApp().SetCommandPromptMessage(L"A very very very very long message … 999999999999999999");
RhinoApp().SetCommandPromptMessage(NULL); // pass NULL to clear ???
RhinoApp().SetCommandPromptMessage(L"a short message");

I tried both SetCommandPrompt and SetCommandPromptMessage with the above and get similar results (I get … 99999 at the end of the short message string appearing in the Rhino text box.

Sorry, try this:


Thank you Dale.

After some tinkering I found that
SetCommandPromptMessage(NULL); also works if I follow it with