Select multiple files revit

hello everyone
Why can’t I select multiple files?
anyone know why?
thank you

Hi @Akli.baliche ,

What is your input in IN[0] and what does the error say?

Hi @jw.vanasselt

I based myself on this discussion, but I do not find the error

I need to see the error that python give you.

Warning:IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (last most recent call):
File “”, line 4, in
ImportError: No module named _rpw.ui.forms.resources

@Akli.baliche

Change line 4 in:

import rpw
from rpw import *

By doing that,
it does not work

Warning:IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 3, in
File “C:\Users\AppData\Roaming\Dynamo\Dynamo Revit\2.12\packages\RevitPythonWrapper\extra\rpw.zip\rpw_init_.py”, line 36, in
File “C:\Users\r\AppData\Roaming\Dynamo\Dynamo Revit\2.12\packages\RevitPythonWrapper\extra\rpw.zip\rpw\db_init_.py”, line 19, in
File “C:\Users\r\AppData\Roaming\Dynamo\Dynamo Revit\2.12\packages\RevitPythonWrapper\extra\rpw.zip\rpw\db\view.py”, line 10, in
File “C:\Users\AppData\Roaming\Dynamo\Dynamo Revit\2.12\packages\RevitPythonWrapper\extra\rpw.zip\rpw\db\collector.py”, line 35, in
File “C:\Users\AppData\Roaming\Dynamo\Dynamo Revit\2.12\packages\RevitPythonWrapper\extra\rpw.zip\rpw\ui_init_.py”, line 1, in
File “C:\Users\aaitmedjber\AppData\Roaming\Dynamo\Dynamo Revit\2.12\packages\RevitPythonWrapper\extra\rpw.zip\rpw\ui\forms_init_.py”, line 12, in
File “C:\Users\aaitmedjber\AppData\Roaming\Dynamo\Dynamo Revit\2.12\packages\RevitPythonWrapper\extra\rpw.zip\rpw\ui\forms\flexform.py”, line 6, in
File “C:\Users\aaitmedjber\AppData\Roaming\Dynamo\Dynamo Revit\2.12\packages\RevitPythonWrapper\extra\rpw.zip\rpw\ui\forms\resources.py”, line 41, in
File “C:\Program Files\Autodesk\Revit 2022\AddIns\DynamoForRevit\IronPython.StdLib.2.7.9\wpf.py”, line 11, in
ImportError: No module named _wpf

@Kibar
Do you have the solution

why did you copy the function out of rpw?
i can’t test it at the moment but it should work as described here:

https://revitpythonwrapper.readthedocs.io/en/latest/ui/forms.html#rpw.ui.forms.select_file

other than that, there has been an issue with pyRevit and rps which describes how rps and pyRevit point to different IronPython versions. they fixed it by assuming dynamo works in IronPython 2.7.3 and pyRevit in IronPython 2.7.7.

you can see in your error message that you’re actually working in 2.7.9. this raises most likely the error.

you’d need to fix the if statement in the file rpw/ui/forms/resources.py on your device, and ideally create a new issue on the github page (or a pull request). don’t get your hopes up too high though. the repo hasn’t been updated in quite some time.

edit:
i see why you copied it out. i did it in an earlier reply of the post you linked, too :slight_smile: