Trouble Registering Plug-In Rhino 6

Hello,

I’m having problems registering my plug-in with Rhino 6. For Rhino 4 and 5, I simply added the plug-in name and filename to the registry (http://developer.rhino3d.com/guides/rhinocommon/registering-plugins-windows/). The next time Rhino started, the plug-in would fully load. Now in Rhino 6, I just get a message saying “Unable to load ExactFlat.rhp plug-in: initialization failed.”.

InitializationFailed

But, if I install the plug-in through Options -> Plug-Ins -> Install button, the plug-in installs without any errors.

Do I need to do something more in addition to adding the registry keys according to the registering plug-ins guide?

Thanks,

-Luke

Hi @lukeniwranski,

The instructions you reference work for me using a simple do-nothing plug-in. What am I missing?

– Dale

Hi @dale,

I’m not sure what’s missing. I can’t get my plug-in to automatically load. I’m sure it’s something on my end, but I can’t find the problem.

What does the Rhino system look for when trying to automatically register a plug-in? What kind of problems will cause a plug-in to fail automatic registration but allow it to be loaded manually?

The error says “initialization failed”. Which CRhinoPlugIn derived functions are called during plug-in initialization? Any tips on where I should be looking to find the source of the problem? Any ideas would be really helpful at this point!

If it helps, I can send you my plug-in so you can see the error on your end. Let me know!

Thanks,

-Luke

Hi @lukeniwranski,

Feel free to forward me anything you want us to look at.

I assume you have an installer for your plug-in. If this is true, then you can always register more of the plug-in information needed (not just what is listed in the document you’ve referenced).

– Dale

Hi @dale,

I’ve been testing the installer on different computers and I’m getting mixed results. On some, the plug-in registers just fine. But on others, the plug-in won’t load correctly unless manually installed. I’m still investigating this on my end before I send you anything.

Hi Dale,
I have been developing a plug-in for rhino to be used in my classes (I teach at Cooper Union college). It is running most of the time, but occasionally I get :initialization failed. In the past (especially when I was using Rhino 5) when I got this error, I randomly changed references Property CopyLocal to True or False and it run. With Rhino 6 it run a few times, but now I can not make it run any more! It keeps giving me: Initialization failed. My Rhino Plug-in, references two other libraries that I have developed. I do understand that CopyLocal should always be set to False. Any ideas what is wrong?
Thanks
Cosmas

FWIW, CopyLocal should be set to False for all the Rhino assemblies you reference (RhinoCommon, RhinoWindows, Eto, etc). You probably can still have CopyLocal set to True for your own libraries.

Yes ALL Rhino assemblies have CopyLocal set to False (that is the default and I never changed it). I have only played with setting True or False my own Library references in an attempt to enable Loading my Rhino addin without the “initialization failed”. Any other suggestions as to why I now always get : Unable to load myRhino.rhp plug-in: initilaization failed ?

Thanks

Cosmas

Hi @tzavelis,

Make sure all non-Rhino dependencies are available in the output folder, along with your plugin .RHP file.

– Dale

I just did that and I even tried some of the system references CopyLocal=True but still get the initialization failed. What trigers Initilization fail?

Hi @tzavelis,

There can be a number of things. Can you post your plugin (and dependencies) for us go review. If needed you can private message me.

– Dale

I will do that, but first I would like to try one more thing. How do I unload my own previous PlugIns? I think there is a conflict with their registry ID’s

Hi @tzavelis,

You don’t really unload plug-ins. However, if you want to uninstall your plug-in, and you don’t have an installer that will do this for you, you can simply remove the .rhp file.

If you want to “unregister” your plugin by hand, then look for your plugin registration in the Windows Registry,

HKEY_CURRENT_USER\Software\McNeel\Rhinoceros\6.0\Plug-Ins\<your_plugin_guid>

When you find the key, delete it.

– Dale

I finally was able to make my Plugin work following your suggestions. There were two identical instances of my plugin showing up in Options Rhino Plugins. Even though I was Installing my plugin every time I run my .net project, I was still getting Initialization failed. I deleted the .rhp file restarted my computer and it now runs. I also realize that it is important to have CopyLocal=True for the references to my own .net libraries because otherwise I get Initialization failed.
Thanks Dale
Cosmas