How can I do this with Python?
import Rhino for i in range(1000): Rhino.RhinoApp.WriteLine("")
On a more serious note, the correct method to use is this:
import Rhino Rhino.RhinoApp.ClearCommandHistoryWindow()
But I don’t want to clean the command history just this list there. You know in cmd if you enter
cls you can still get your previous commands using the [kbd]UpArrow[/kbd]
sidenote: what’s with the kbd tag ? @dan ?
I’m not sure, is there even a type of up and down arrow function in rhino for the commandline?
It was just an example that
cls does not clean the history just the
terminal in CMD
Well going solely by the name of that function i would assume it behaves exactly like
It doesn’t, it also cleans up the history of the commands.
- start several commands. Place some points in 3d.
- launch this from python:
import Rhino #Rhino.RhinoApp.ClearCommandHistoryWindow() print Rhino.RhinoApp.CommandHistoryWindowText
3 . then try your command
4 . and again launch step 2.
The commands that you used to create the objects are not displayed, they are removed from the history. I want to simply clean this window without deleting the history.
I run some commands…
I call the function:
Rhino still knows the history of commands, just the Text has been cleared, exactly like
Try this out:
import Rhino print Rhino.RhinoApp.CommandHistoryWindowText Rhino.RhinoApp.ClearCommandHistoryWindow() print Rhino.RhinoApp.CommandHistoryWindowText for command in Rhino.Commands.Command.GetMostRecentCommands(): print command.DisplayString
<kbd> UpArrow </kbd>