FlexForm from rpw.ui.forms

I am having trouble creating a basic script to test out using FlexForm from rpw.ui.forms to take multiple user inputs.
I get type error "takes exactly 3 arguments(2 given).

When i Copy the code from the documentation i get the same type of error, but it refers to the script in pyrevit library.


I also tried copying some code with flex form from pyChilizer from github, but get the same problem.

Can someone help me understand what it going wrong here?

And my code:

from rpw.ui.forms import FlexForm, Label, ComboBox, TextBox, Separator, Button, CheckBox

components = [Label("Choose View Template"),
              ComboBox("combobox2", {"Opt 1":10.00, "opt2":20.0}),
              TextBox("textbox1", Text="EIHD"),
              CheckBox("Use same prefix for all views"),
              Separator(),
              Button("Create Views")]

form = FlexForm("ViewSet Creator", components)
form.show()

print(form.values)
print(form.values["textbox1"])

Hi ,
It looks like your CheckBox is missing two arguments.

Hi @eivhal ,
This is a problem in the flexbox internals;
Try to select a previous version of the ironpython engine.
Let us know if there is a version in which it runs fine

I know this is an old thread, but i ran into the same problem.

For anyone stumbling across this:
Versions that still seem to work is IronPython Engine 277, 278, 279, 2710
Using Custom pyRevit IronPython Engine 2711 starts producing this error.

image

2 Likes

fixed by @jbf1212
see: Flexform rpw 4.8.15 - #5 by Jean-Marc

1 Like

This is probably the best news ive received all week. :green_heart:

I’ve been breaking my head trying to look for alternatives to RPW to fix all my code that recently broke.

Thank you so much for updating us on this @Jean-Marc

2 Likes

hi there I am having a problem now after the latest version installation, where can I see the option for this?

edit: nevermind, it’s working, just saw this post

1 Like

Thanks so much for fixing this!

I finally got around to testing it, and it works fine.
Now the possibilities are endless!

1 Like