Empty toolbar after closing all ToolbarFiles

Hello Forum,

I’m still struggling against empty toolbars.

In my last test I did, at plugIn loadTime:

  1. Delete the appData UI folder
  2. Delete the appData settings folder
  3. Delete all my .rui files and their backups

Here is my code:

public override PlugInLoadTime LoadTime
            //get { return PlugInLoadTime.AtStartup; }
                    Directory.Delete(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\McNeel\\Rhinoceros\\6.0\\UI", true);
                    Directory.Delete(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\McNeel\\Rhinoceros\\6.0\\settings", true);
                return PlugInLoadTime.AtStartup;


Then at first Rhino idle event, and just once, I close all ToolbarFiles like this:

foreach (Rhino.UI.ToolbarFile tf in RhinoApp.ToolbarFiles) RhinoApp.ToolbarFiles.FindByName(tf.Name, true).Close(false);

and the result is:

If I drag the empty toolbar in the viewport:

I have not even the controls to close it!

Any idea?
Thanks. L

Hi @lscandella,

Can we take a step back? Why are you deleting these files? What problem are you trying to solve?

– Dale

Hello Dale!

The problem is an empty toolbar which insists on appearing on my clients. When we upgraded from Rhino 4 to Rhino 5 we solved it by managing the Windows Registry. This time, upgrading the clients form Rhino 5 to Rhino 6, those parameters are no longer in the registry and then I’m performing my analysis to remove them.

I then stripped the problem as much as possible, including making sure that no data from previous sessions can be recorded. This is why I’m deleting these files. It looks like that in a clean environment with the default toolbars if I close them with

foreach (Rhino.UI.ToolbarFile tf in RhinoApp.ToolbarFiles) RhinoApp.ToolbarFiles.FindByName(tf.Name, true).Close(false);

an empty toolbar is shown. My purpose is to remove it

Thanks. L


could you reproduce it?

Thanks. L