Block Rhino 7 from loading Rhino 6 plugins

Hi,
I was wondering if there is a way to tell Rhino 7 to not try to import Rhino 6 plugins. Our problem is that our plugin is optimized for Rhino 7 and sometimes it happens (due to install order of Rhino and the plugin) that the version from Rhino 6 is picked up. We would like to let Rhino know somehow that there is no need to load the old version

Is there any smart way? Other than deleting the old version?

Thanks a lot,
Alberto

You could update your plug-in to check the Rhino version when it first loads. In C#…

protected override LoadReturnCode OnLoad(ref string errorMessage)
{
    if (Rhino.RhinoApp.Version.Major != 6)
    {
        // don't load (quietly)
        return LoadReturnCode.ErrorNoDialog;
    }

    return base.OnLoad(ref errorMessage);
}

You can do the same thing in c++ with CRhinoPlugIn::OnLoadPlugIn().

@stevebaer/@dale, any other ideas?

3 Likes

This is so simple and brilliant that nobody of us thought about it. Yea, that is quite an idea. we can #ifdefit around to have it only for the R6 build.

Thanks a lot!

Will’s solution is a good one that I would also recommend.

If this remains a problem after making these changes, let us know and we can try to figure something else out.

Hi all,
I’m glad I found this discourse thread as we have been having some issues with Rhino 6 plugins automatically loading in Rhino 7 and creating instability and crashing in v7. I wanted to chime in on this issue as I’ve observed this to be a persistent and recurring problem being encountered by Rhino 7 users and this has impacted our plugins as well as other plugins out there.

It seems an odd decision that Rhino 7 would automatically load plugins originally deployed/registered for a Rhino 6 install. I understand that a “continuity of experience” for those upgrading to 7 could be theoretically beneficial, but it also seems to be a problematic assumption that a Rhino 6 plugin is designed to “just work” in Rhino 7.

The developer code above is helpful, but it seems that there should be something more fundamental - I would expect there to be a setting or some other deliberate user decision needed to migrate or prevent migration of plugins from 6 to 7.

cc @stevebaer @dale @will

2 Likes

I totally agree, especially because some behaviours are not consistent between 6 and 7. Therefore any assumption you made while developing for 6 may not hold water on 7, we had several regressions on our plugins when moving to 7. So we implemented the blocking of the loading but it still is not 100% the best solution.

1 Like

Hey @archinate1,

To disable Rhino 7’s automatic migration of Rhino 6 plug-in, add the following Registry value:

Hive:  HKEY_LOCAL_MACHINE
Key:   SOFTWARE\McNeel\Rhinoceros\7.0
Name:  enable_plugin_migration
Type:  REG_DWORD
Value: 0

I’ll should add that the decision to automatically migrate plug-in from Rhino 6 to Rhino 7 was thoroughly thought out. If you want to discuss the merits of this decision openly, I suggest starting a thread over in the Rhino for Windows category.

Let me know if this helps.

– Dale