- #Rhinoceros 6 for private user install#
- #Rhinoceros 6 for private user update#
- #Rhinoceros 6 for private user code#
Pc.LoadProfileString(lpszSection, L"PlugInVersion", m_last_version) Get the version number of our plugin that was last used Void CTestlugIn::LoadProfile(LPCTSTR lpszSection, CRhinoProfileContext& pc) file, it will automatically stage it, if it doesn't already exist. After successfully loading the plugin, if Rhino detects a plugin RUI Settings.SetString("PlugInVersion", Version) Save the version number of this plugin to our settings file. Build a path to the user's staged RUI file. If (0 != string.Compare(Version, plugin_version, StringComparison.OrdinalIgnoreCase)) version number of this plugin, proceed. If the version number of the plugin that was last used does not match the If (!string.IsNullOrEmpty(plugin_version)) Var plugin_version = Settings.GetString("PlugInVersion", null) Get the version number of our plugin, that was last used, from our settings file. Protected override LoadReturnCode OnLoad(ref string errorMessage) / Called when the plugin is being loaded.
#Rhinoceros 6 for private user code#
This can be done programmatically by adding the following code to your plugin object’s OnLoad override. You can get Rhino to re-stage the RUI file by deleting it in %APPDATA% and restarting which will cause Rhino to copy the file again since it no longer exists.
#Rhinoceros 6 for private user update#
If you were to uninstall your plugin and delete the RUI file from the %APPDATA% folder, then the RUI file will load if you re-install your plugin.įinally, if you update your plugin, Rhino will not re-stage the RUI file because it already exists. Thus, the RUI file will not load if you re-install your plugin. The logic is if the user closed the file, we don’t want to keep loading it every time Rhino starts.Īlso note, if you uninstall your plugin and manually close the RUI file, within Rhino, you are telling Rhino you no longer want to auto-load the RUI file. If a user closes an RUI and the RUI file is associated with a plugin, the file name goes on a list so that Rhino does not automatically open the RUI file in the future. Note, there is additional code in Rhino that saves the name of RUI files closed by the user. You can revert to the original, or default, RUI file by deleting the RUI file in the %APPDATA% folder and then and restarting Rhino, which will cause the file to be staged again, as the file no longer exists. It is copied, or staged, to ensure that the file is writable and to provide a way to revert to the original, or default, RUI file if needed. If it is found, it is copied to the following location and opened: %APPDATA%\McNeel\Rhinoceros\\UI\Plug-ins\ The first time a plugin is loaded, Rhino looks for an RUI file with the same name as the plugin.
#Rhinoceros 6 for private user install#
If you give your custom RUI file the exact same name as the plugin RHP file and install it in the folder containing the RHP file, then Rhino will automatically stage it to a writable location and open it the first time your plugin loads. For details on creating toolbars, see the Rhino help file. You can save your custom toolbars in your own Rhino User Interface (RUI) file. If you want to create Rhino-style toolbars, then use Rhino’s Toolbar command.
How can I create one or more toolbars for my plugin, and how can I deploy these toolbars with my plugin? Answer This guide covers the creation and deployment of plugin toolbars.