Rhino Script Compiler for Rhino5, second Beta

@stevebaer,

small bug: When a *.rhi file is created with the plugin compiler and the *.rhi file is run, the install dialog comes up. In this dialog, the “Abort / Cancel” button does not work.

c.

Hi Steve,
sounds great. I have a python script which uses the libraries numpy and scipy. What are the software prerequisites for running a compiled script which uses these libraries, assuming you have installed only Rhino 5 on Windows?
Kind regards,
Lorenz

Is this a question about the script compiler or python in general?

I know that there are several steps to do before you are able to access numpy from RhinoPython, as you explained here: https://stevebaer.wordpress.com/2011/06/27/numpy-and-scipy-in-rhinopython/
I was wondering if the compiler somehow shortcuts some of these steps …

No, the compiler is not that smart

hi @stevebaer,

Here is another fix request for the compiler. Hope we can get it to work in the new version:
http://mcneel.myjetbrains.com/youtrack/issue/RH-31820

(more on the issue here: Running scripts inside Rhino commands (-_Runscript vs. compiled plugins) )

thanks!

–jarek

Hi @DavidRutten, @stevebaer,

Any hopes we can get the compiler fixed to allow running compiled script command within transparent commands ?
It worked back with Monkey, but I can’t use it anymore to compile for V5. In that respect with the new compiler we took a step back…

thanks,

-jarek

Rhino.InCommand
Determines if Rhino is currently running a command. Because Rhino allow for transparent commands (commands that can be run from inside of other commands), this method returns the total number of active commands.
Syntax: Rhino.InCommand ([blnIgnoreRunners])
Returns: Number - The number of active commands.

Let’s have it changed to: returns always 0 unless the compiler gets fixed to allow running compiled scripts inside commands. Could be easier than fixing the real issue :wink:

The V5 compiler is not RMA’s best work. Try compiling scripts using Rhino’s “Open” command and you will see how it fails. Script runs, compiled version fails. It would be nice if V6 got a compiler that works reliably.

Dan

Since compiler is a stand-alone project I REALLY hope we will not have wait till V6 release for the obvious problem fixes.

I realize that the compiler right now is nobody’s child but it is a bit strange that with what I guess should be a ‘small fix’ in obvious bugs in both cases mentioned the script developers don’t get good support - something we got used to from RMA in the past.

–jarek

Isn’t there a python-plugin-script compiler made for V6 yet?
I really need one! :slight_smile:

Me too.

I believe that if you copy RhinoCommon.dll from the RhinoWIP directory and paste it in the same directory as the script compiler, the compiler will pick up on this and generate a V6 plug-in

1 Like

Thanks, it works when I point the ScriptCompiler SDK settings to the WIP RhinoCommon.dll. (Either in the RhinoWIP directory, or copied out as I just did) Excellent!

1 Like

Hi @stevebaer @Holo,

I found I had to move the RhinoCommon.dll to the same folder as the compiler, but then when I loaded the plug-in I got a warning that I had to delete RhinoCommon.dll. I did that and it worked. Just thought I would mention it.

Thanks,

Dan

re: scriptcontext

Thanks @clement for pointing me to this post. This solved the issue I was having with the scripts failing when compiled.
I’m not sure how I missed this 2 years ago, but better late than never.

Thanks Steve for making this change.

Dan

Is this still the case for compiled python scripts?

Thanks Mark

When using the option “Generate source” of the script compiler, I get the following error:


Is this a known issue?

Not really. Are you compiling from a network drive or any other unusual configuration?

I’m compiling on my local disk, and can reproduce the problem on several workstations. My user account does have admin privileges.
Interestingly a similar error message (access denied) is reported when building plugins, in the cleanup step:

Compilation succeeds and the temporary folder created by the script compiler contains the plug-in, i.e. it’s not a big problem I’m experiencing. Still it would be nice to solve this.
On another note: Have you thought about open sourcing the script compiler? I would contribute to it.