GrasshopperUnloadPlugin in rhino6

I added a new command to the next Wip called _GrasshopperReloadAssemblies which will unload all those GHA files that were memory loaded, and then immediately try to reload them. It doesn’t require that the Grasshopper window is closed and opened again, but it will not work while any Grasshopper files are loaded.

The command is classified as a ‘test’ command for the time being and thus will not autocomplete. It is impossible to properly unload an assembly from an AppDomain, but unless an assembly has registered event handlers or uses some sort of static caching, it shouldn’t matter that it remains loaded in the background.

Of course just like _GrasshopperUnloadPlugin, GHA files that were loaded from the disk rather than through memory cannot be replaced at all since they are locked by Windows while running.

Since this new command is far more specific in what it does, I’m hopeful it will not have the same problematic side effects the old _GrasshopperUnloadPlugin command did, especially with respect to Python.

6 Likes