Have you tried it without | *rvt
as @blsalvio suggested?
edit :
sorry, it doesn’t make sense to leave it out. The function needs the extension filter to be described that way.
edit2:
It seems like the Dynamo package of rpw is missing a part in the definition of select_folder. It does not take multiple
when returning the filenames.
Paste the following into your python editor in Dynamo:
import sys
sys.path.append(IN[0])
from rpw.ui.forms.resources import *
def select_file(extensions='All Files (*.*)|*.*',
title="Select File",
multiple=False,
restore_directory=True):
form = Forms.OpenFileDialog()
form.Filter = extensions
form.Title = title
form.Multiselect = multiple
form.RestoreDirectory = restore_directory
if form.ShowDialog() == Forms.DialogResult.OK:
return form.FileName if not multiple else list(form.FileNames)
filepath = select_file('Revit Model(*.rvt)|*rvt', 'Select RVT File', multiple=True)
OUT = filepath
The Dynamo package is missing the if not multiple else list(form.FileNames)
part