Reset ToolBar to default

Hello. I created an installer for my Rhino plugin that adds a ToolBar tab with commands. After installation everything works fine, after uninstallation the plugin was completely removed, but my tab remained on the ToolBar. I was only able to return the ToolBar to its previous state thanks to the ToolBarReset command. I’ve tried deleting the .Rui file from the path C: \ Users \ \ AppData \ Roaming \ McNeel \ Rhinoceros \ 6.0 \ UI \ Plug-ins, but that didn’t work either. I am thinking to run a similar command in my code. I searched in Rhino C # API for a method similar to ToolBarReset, but unfortunately there is no such method. If anyone has any ideas on how to write the ToolBarReset command yourself, or any other ideas, any help would be welcome. Thank you in advance))!

If the Rhino plug-in you are working on is for other people, I’d be really careful about going in this direction. Toolbar Reset is extremely destructive and not it only deletes your plugin’s toolbars, but also any other toolbars or changes to an existing toolbar that a user has purposely done.


1 Like

Hi @leusd100,

As @gustojunk says, you should not run ToolbarReset for user, as you’ll destroy all of their customization. If they move one or more of your toolbars into their default workspace, then they will need to clean these out themselves.

– Dale

Thanks for the answer)) I already realized that I was moving in the wrong direction to solve the problem. Is it possible to track the addition of my panel to the workspace, perhaps there is a way to track it in the registry or the only way out that the user would clear them on his own?


No, sorry.

– Dale

OK thanks