Hi,
Switching recently our production to Rhino 6 I have encountered a major drawback compared to V5 (and earlier versions):
For some reason, compiled scripts would not run either scripts via -_RunScript() or compiled script commands, from Rhino.Command function. Please note there is no problem if the main calling script runs from ScriptEditor.
This is a big problem since a lot of our in-house tools and some of my publicly released plugins rely on this functionality working (including those literally used every 5 minutes that deal with view manipulations, used in-command of other, more complex tools.)
I realize the above may sound a bit confusing, so I have prepared simple examples to test (all should work fine in V5, not at all in V6):
Please install this compiled RhinoScript test plugin:
GetStringPassCommandTest.rhp (8.5 KB)
It has 2 very simple script commands:
-
GetStringPassCommandTest
: this one actually tests the above problem and would try to run other scripts/commands in its runtime
-
TestCompiledScriptCommand
: sample message box - an abstract script/command that doesn’t work (as all others non-Rhino commands)
Here are the actual scripts used to compile the above plugin:
GetStringPassCommandTest.rvb (813 Bytes)
TestCompiledScriptCommand.rvb (300 Bytes)
Things to try:
- Install the test plugin (in V5 and V6)
- run
GetStringPassCommandTest
- from here, any native Rhino command should run “inside” this command prompt (try:
_Box
)
- pick “
TestCompiledScriptCommand
” command-line option - it will attempt to pass this string as command name to Rhino.Command inside the “GetStringPassCommandTest” plugin.
In Rhino 5 message box will show (command runs, no problem), in V6 nothing happens.
Also:
- Try putting the source of “
TestCompiledScriptCommand.rvb
” on toolbar button inside -_RunScript (… )
- run
GetStringPassCommandTest
command, and try clicking the button while in prompt: in V5 all works OK (message box), in V6 I can only see “RunScript” passed to CommandLine, and nothing happens.
Finally:
- open the “
GetStringPassCommandTest.rvb
” in RhinoScript Editor, and run it
- the button should work OK inside the script prompt (V5 and V6), also, the compiled command “
TestCompiledScriptCommand
” should also work OK inside the script prompt (V5 and V6).
So - clearly in V6 there is an issue preventing compiled script commands running other scripted commands or _-RunScript()s in their runtime. I guess this is not the compiler problem since in V5 all works OK, but something broke in the way V6 handles this situation.
This is another show-stopper for the V6 production switch over here.
Hope someone can help to fix it! (@Pascal - any volunteers?
)
Thank you,
–jarek