rs.BrowseForFolder() non-functional?

OK, I see this YT item:

But the issue has been closed, fixed for Mac 6 WIP, however it doesn’t appear to be fixed in 5.5.2 - in any case I can’t get it to return anything but None here.

So that means that any script that needs to choose a folder is now out for the future of Mac V5? That isn’t a very happy situation (to put it nicely)…

Hi Mitch, not sure if this works as a temp workaround, i cannot test it on Mac:

import Eto
import Rhino

def DoSomething():
    dialog = Eto.Forms.SelectFolderDialog()
    dialog.Directory = None
    dialog.Title = "Choose a folder"
    rc = dialog.ShowDialog(None)
    if rc != Eto.Forms.DialogResult.Ok: return rc

    print dialog.Directory

And @Alain or @curtisw, if you could help here: Why is it not possible to pass the parent window like this:

parent = Rhino.UI.RhinoEtoApp.MainWindow
c = dialog.ShowDialog(parent)

it gave me a “non implemented” error on Windows. I’ve tried all kind of variations eg. Rhino.RhinoApp.MainWindow() gives me this error:

Message: expected Window, got RhinoWindow

the purpose of passing the parent window is to make the dialog block Rhino while a folder is chosen. If i pass None as shown above, this does not happen and Rhino is still accessable.


As far as I understood from the bug report linked above, ETO is not supported in Rhino 5 for Mac…

This goes deeper than merely a scripting issue and unfortunately it’s not a small change.

Well, it WAS working in the past. The only thing that was wrong was that the title and/or message arguments weren’t working… I have past scripts that worked with this exception…

I missed (forgot) that it was working on Rhino for mac os 5 before. I’ll take a look at how it worked.

Can I ask, is rs.BrowseForFolder title= still not working as expected? I still get ‘Select Folder’ at the top.

@Helvetosaur or am I imagining it?

OpenFilenames is okay though.

I will look at that. Thanks for reporting. (RH-55331)

1 Like

Thanks for the info