I’m trying to load my plugin on startup.
What I thought was needed:
Protected Overrides Function PlugInLoadTime As Rhino.PlugIns.PlugInLoadTime
Rhino.RhinoApp.ClearCommandHistoryWindow()
Rhino.RhinoApp.WriteLine("Plugin Loaded")
Return Rhino.PlugIns.PlugInLoadTime.AtStartup
End Function
But Overrides gives an error and its not working. I also removed the registry for my plugin in: rhino/Scheme: Default/Plug-Ins/1c7a3523-9a8f-4cec-a8e0-310f580536a7/Settings/Startupfilelist so it wouldn’t load my old settings.
On the script above I removed overrides but nothing.
Probably, the first two lines should not be in PlugInLoadTime but in OnLoad.
In PlugInLoadTime, only return “AtStartup”.
Then, when your plug-in is actually loaded, you can clear the command window and write that the plug-in was loaded.
If you remove the entry in the registry for your plug-in, you need to re-register the plug-in. The easiest way is to drag-n-drop the plug-in on a running Rhino. Otherwise Rhino does not know your plug-in at all.
The plug-in needs to load at least once to change the plug-in load time. If the plug-in is never loaded Rhino cannot change the load time, because Rhino checks for (changes in) the load time when the plug-in loads.
In other words: your plug-in load time was WhenNeeded. This is what Rhino knows and writes in the registry. Then you change it to AtStartup. Rhino still has “WhenNeeded” in the registry, until you load the plug-in once. Then Rhino writes “AtStartup” to the registry and will load your plug-in at start-up from that point in time onwards.
Well, I’m starting to run out of options here. Are you sure that the plug-in dropped on Rhino is the one built with the AtStartup in it, and not an “old” one (check the date of the file)?