Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5938

How to pass default extension to rs.OpenFileName()?

$
0
0

@clement wrote:

Hi all,

i am not able to pass the default extension to rs.OpenFileName(). How is this done properly ?

import rhinoscriptsyntax as rs

nfilter = "Text (*.txt)|*.txt|STI files (*.sti)|*.sti||"
filename = rs.OpenFileName("File", nfilter, None, None, extension="sti")

it always uses the txt extension, i´ve tried *.sti, .sti, sti or the description, filter strings and both. :confused:

-
c.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles