rs.CloseToolbarCollection() doesn't work in Rhino8

To be clear, in Rhino8, almost none of the toolbar commands that concern individual toolbars work (show, hide, isvisible, etc). However, most of the commands that concern toolbar collections do seem to work…but not this one (I haven’t tested all of them so there may be others that don’t work)

The underlying code in the toolbar.py file is below (with the documentation comment removed and two test print statements added)

def CloseToolbarCollection(name, prompt=False):
    tbfile = Rhino.RhinoApp.ToolbarFiles.FindByName(name, True)
    print(tbfile)
    if tbfile:
        print("we got here")
        return tbfile.Close(prompt)
    return False

I brought this function into my own py file, and passed the name of my toolbar collection to it. These were my results:

<Rhino.UI.ToolbarFile object at 0x0000000000000096 [Rhino.UI.ToolbarFile]>
we got here

So, it looks like I’m getting a valid ToolbarFile object, but its Close() method is not working for some reason. If you pass True to the prompt parameter, you even get the prompt asking if you want to close the toolbar file. But clicking Yes still doesn’t close the file.

Hi @williamjb741,

This has been fixed. Looks like you’ll see it in an SR8 RC coming soon.

https://mcneel.myjetbrains.com/youtrack/issue/RH-81346

– Dale

1 Like

Hi @dale ,
We are in the same problem in version 8.6 of C# RhinoCommon in Windows.
Would this problem also be solved in version 8.8 of the C# RhinoCommon SDK?

Thanks!