Button script for temporary loading plugin


#1

Hi,

since I have a problem with crashes caused by an Octane-Vray conflict I disabled Octane and manually load it if needed. Could it be done per button script? My way is: plugin manager: enable “load” -> “load plugin” -> disable “load” (I don’t want an automatic load if I will start Rhino again) for the Octane plugin. I would like to press a button for loading Octane. Maybe someone has an idea.

Best -
Micha


#2

In the plug-in manager, you can apply load protection to a plug-in. That way it will ask you if you want to load the plug-in every time you start Rhino, if you say no, it won’t load…

I also have a script that I use to enable/disable certain plug-ins, but it requires restarting Rhino after punching the button to load or unload.

–Mitch


#3

I used the start-time-question option, but it’s not so comfortable since I start a lot of rhino task over the day and the start screen is hidden by the plugin-load window.

Manually I can load a plugin for the current session only - without to restart Rhino. Shouldn’t possible for your script too?


#4

Well, at the time I wrote the script (with vb Rhinoscript) it was the only way. I haven’t looked into it recently, with Python/RhinoCommon it might be possible, let me have a look…

Edit - no, unfortunately, I can’t get this to work in RhinoCommon either, still needs a restart.

–Mitch


#5

Hi Mitch,

I’m looking to write a script to load the RhinoCAM plug-in without having the user go to the plug-in manager. We have licenses floating on the server, but just opening Rhino uses a license. I want the plug-in to be loaded on demand, not automatically, and unloaded on demand as well when the user is finished using it. Realistically, the license shouldn’t be taken until RhinoCAM is initiated and should return the license when it’s closed. Just like Bongo does with the timeline. But that’s a subject I will discuss with Mecsoft.

Since this post is 2 years old, I was wondering if you discovered a way to do this with a script, but without a restart.

Thanks,

Dan


#6

No… I don’t know how to do this without closing and opening Rhino… Below is what I have, but you will need to restart Rhino. Note RhinoCAM stays installed, it is simply enabled or disabled.

Maybe the bigger brains have a better solution, the Rhino.PlugIns.Plugin class seems to have a lot of methods including GetPlugInObject and LoadPlugIn, but I don’t see any way to unload a plug-in…

Here is my Enable/Disable code FWIW:
EnableRhinoCAM.py (505 Bytes)
DisableRhinoCAM.py (514 Bytes)

–Mitch


#7

Thanks Mitch.

I just ran across an issue where a user couldn’t open Rhino because the RhinoCAM demo mode splash screen opened behind other windows and he didn’t see it. RhinoCAM needs an on/off button if you’re running over the network.

Dan


#8

Yeah, this is really annoying… --Mitch