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