rs.OpenFileName() request

Can the default extension argument be made to accept a list of extensions instead of a single one? Like, say, filtering for .dxf, dwg, and .3dm? Or is this a Windows-controlled thing that Rhino can’t do anything with…

Thanks, --Mitch

Hi Mitch,

Does this work for you?

filter = "Some description |*.dxf;*.dwg;*.3dm"
1 Like

Hi Alain,

The “filter” argument works fine with multiple file types… The “extension” argument doesn’t - it expects a single extension in the form of a string it seems…

Cheers, --Mitch

Sorry, I misread.

Since extension is the default extension to add if you didn’t specify any how could it be more than one value?

If

filter = "Some description |*.dxf;*.dwg;*.3dm"
extension = "3dm"

then if you just type “myfilename” in the open dialog “myfilename.3dm” will be returned.

Yeah, guess that was a brain fart there, can only have one default extension logically…

What I was hoping for is to be able to see all the .dxf, .dwg and .3dm in a folder in order to choose, but unfortunately, the default extension only allows you to see one type at a time.

–Mitch