Flexform rpw 4.8.15

Je viens d’installer la mise à jour pyRevit 4.8.15 et un de mes script qui utilise flexform de rpw ne fonctionne plus.
Est-ce normal?
Voici le code de la définition :

def show_task_dialog(pipe_types, system_types):
# Liste pour stocker les noms des types de canalisation et de système
pipe_types_name = [pipe_type.get_Parameter(BuiltInParameter.ALL_MODEL_TYPE_NAME).AsString() for pipe_type in
system_types_name = [system_type.get_Parameter(BuiltInParameter.ALL_MODEL_TYPE_NAME).AsString() for system_type in

components = [
    Label('Type de canalisation:'),
    ComboBox('pipe_combobox', {pipe_name: pipe_type for pipe_name, pipe_type in zip(pipe_types_name, pipe_types)}),
    Label('Type de système:'),
    ComboBox('system_combobox', {system_name: system_type for system_name, system_type in zip(system_types_name, system_types)}),
    Label('Diamètre (en mm):'),
    TextBox('diameter_textbox', Text=""),
form = FlexForm('Sélectionnez les détails de la canalisation', components)

# Récupérer les valeurs sélectionnées
values = form.values
pipe_type_selected = values['pipe_combobox']
system_type_selected = values['system_combobox']
diameter_entered = values['diameter_textbox']

# Convertir le diamètre en millimètres en unités internes de Revit
diameter_internal_units = UnitUtils.ConvertToInternalUnits(float(diameter_entered), UnitTypeId.Millimeters)

return pipe_type_selected, system_type_selected, diameter_internal_units

Merci d’avance pour votre aide !

Oui et c’est mentionné dans les releases notes.
Le forum est en anglais stp.

Mentioned in the release notes, It is coming from the 2.711 ipy engine, the flexform (rpw module) requires some love.
Can you share the error message?

sorry, i will try to write in English.
Here is the error message :
“Erreur dans la transaction : LoadComponent() takes exactly 3 arguments (2 given)”
Thanks for help.

Can you say any more about RPW needing “some love”. ?
I have scripts using flexforms. I will have to wait to update to 4.8.15 until I can understand the impact. Thanks!

It just got the love it needed

Latest installer here Merge pull request #2188 from jbf1212/rpw_engine_update_v2 · eirannejad/pyRevit@9af22d9 · GitHub

The back story is:

The latest ipy engine 2711 was incompatible with one of the rpw module import.
We deprecated “prior to 2711 engines” in the latest release. Therefore the error, 3 args required 2 passed.
The way the ironpython wpf dll was brought in in rpw was the issue.
@jbf1212 :tada: refactored the way to import it mimic-ing the way it is done in pyRevit in general and it seems to behave just fine now


It works great now
Thank you so much @Jean-Marc

1 Like

Thank you so much @jbf1212
Best news ive received all week :green_heart:

1 Like

Seems to work perfectly. Thanks
@Jean-Marc @jbf1212 !

1 Like

Thanks, with this installer it works perfectly. However, I deploy pyRevit to my company using the pyRevit CLI. Building a clone with the classic pyrevit clone myName base --dest="my-path" seems not to sole the rpw issue. :frowning:
Which <deployment_name> should I use?

Use the develop-4 branch.

1 Like

Thanks a lot @Jean-Marc , worked perfectly.
For whom read the post without being confident with the CLI, the code is pyrevit clone myName base --dest=my-path --branch=develop-4.

For our understanding, is the branch develop-4 a wip and soon the correction to rpw will be implemented in the main branch as well? I’m asking so to know if will be necessary to update the deploying script for my office.

The develop-4 is the development branch for the actual pyrevit 4.ish

Yes the changes will be pushed in the master branch. Probably in a couple of months.

The other develop branch is for pyRevit 5, which will be compatible with Revit 2025, incorporating the changes necessary to match the new .net framework imposed by the new version of Revit.

There is a meetup tomorrow where you can get inside these discussions and ask your questions.
Senseï Ehsan will be there and many other active users of pyrevit.