It looks like in V9 the CommandHistory method ignores everything that gets printed to command line by the commands. Before we were able to capture all printed, in V9 its just the main command name. This breaks a lot of scripts we had running in previous Rhino versions.
You can test this in V9 vs older versions:
Option Explicit
Call Main()
Sub Main()
Call Rhino.ClearCommandHistory()
Call Rhino.Command("-What _HistoryWindow")
'reading command history window content
Dim strHistory : strHistory = Rhino.CommandHistory()
End Sub
Thanks for reporting the issue. However, I’m unable to replicate it on my end. Can you please run the attached script and send the output .txt file (it is a modified version of your script)? It would also be helpful if you ran the _SystemInfo command so and paste that here so I know your machine details.
Thanks for testing it. I think I found the problem or what has changed. The multiple lines in the single history string used to be separated by chr(13), and in BETA they are separated by chr(10).
So in order to get the history lines array, we used to do:
Dim arrTxtLines : arrTxtLines = Rhino.Strtok(strHistory, chr(13))
and it BETA, it needs to be:
Dim arrTxtLines : arrTxtLines = Rhino.Strtok(strHistory, chr(10))
That’s why in the old debugger I could see:
And in BETA in debugger I see only:
even though its all there, but split into multiple lines differently.
Now, this breaks a bunch of older scripts and plugins relaying on the chr(13) separation. Do you think we could have it back the old way?