Update: Multiple Input Form With Dynamo

  • I hesitated between updating the previous post directly or posting a new post. I finally decided to make it a new post so that it’s not too long to read. I will only develop on new stuff here.

I have updated the UI.MultipleInputForm so it could handle more input types:

newnode
UI.MultipleInuptForm, Data-Shapes package

 

Here is the Input type codification:

winforms
Input type codification

 

1. Revit Selection Inputs:

The Revit element, face, and edge selection inputs are pretty straight forward. These type of inputs generate a button that allows interaction with the Revit model. The selections are then output as lists. Here is an example with the “se” (select Revit element) input type:

select-element
Revit element/face/edge selection inputs

2. ComboBox Inputs:

String and Number lists:

The combo box is the only input that needs special treatment, because there is no codification.  In order to create a drop-down list input in the form, you just need to feed your drop down list items as a one level nested list within the InputTypes list. The list structure is very important here.  The List.Create Node is perfect for creating the right input:

combonew
Drop-down list input creation

 

You can- of course- add as many drop down lists as you want:

multi-dropdown
A form with multiple drop-down lists

 

 

Revit Element lists:

In case you use Revit elements as items for your drop down list, the node will display the name of the elements, and return the Revit element as an output:

revitelement-list
Using Revit elements as drop-down list items

 

3. Form features:

I have also added a couple of features to the form. I followed Brendan Cassidy’s example and deleted the maximise/minimise and resize options. I also set the form so that it would always be in the forefront, this way it will never be hidden which could prevent Dynamo and Revit from working.

This node should make it a little easier for those allergic to Dynamo to benefit from its power!

Here’s the code to the node:

29 thoughts on “Update: Multiple Input Form With Dynamo

  1. This is a great resource!

    I noticed a couple of things:
    – The latest version (13-11-2016) doesn’t allow multi inputs. the older versions do.
    – The dropdown list doesn’t seem to work at the moment either.

    This is the only source for a UI i’ve come across on the web, very useful

    Like

    1. Hi Marlo, Thank you for the feedback. I just ran a test and it turns out the issue comes from the way the python node is wrapped in the custom node. Thanks for pointing this one out!
      Please update the package to the vesrion 2016.11.15 ans let me know if it’s working fine for you.

      Like

      1. I’ve tried it, and it works as a charm now.
        Also i’ve been looking at the code and i noticed it’s not possible to fill in a default value. Will this be possible in the future?

        Recently i’ve been working on several Revit Add-Ins, and if you’d like i can test your new versions and maybe also add some idea’s to add new functionality.

        Cheers

        Liked by 1 person

    2. allowing a default input value would indeed be a good idea. I was trying to keep the inputs to the minimum, in order to keep is as simple as possible. I have been thinking about making another node with more inputs, like default values and styling options. I will definitely keep you posted when it’s ready !

      Like

  2. Terrifically useful node – thanks so much for creating and sharing! If I had the ability I would love to modify to allow multiple selection listboxes for input Alas my coding skills are currently limited to the now archaic Pascal and FORTRAN.

    Liked by 1 person

  3. Hi want to use this.But I am facing
    warning:
    IronPythonEvaluator.EvaluateIronPythonScript
    operation failed.
    Traceback(most recent call last):
    File””,line 101,in
    IndexError:index out of range: 1

    Like

      1. Hi solved that problem,but now I am facing another.Droop down menu is not working.
        I posted it in Dynamo forum.Please see it.

        Like

    1. Hi Duy Vu ,
      I tried your script on Revit 2017 and Dynamo 1.2.1 and it all seems to work fine. Don’t forget to press finish when you’re done selecting the elements :

      What do you mean by “could you add an element selection” ?

      Like

  4. Hi there,

    First off; what a fantastic script! With that set: Is there any way to change the width of both the window/UI menu and the input names? I managed to figure out how to adjust the height (“y”), but can’t seem to find the “x” anywhere.

    With kind regards

    Liked by 1 person

    1. Hi Mathias,
      thanks for your message! If you want to modify the width of the label width you need to change the value on line 110 “label.Width = 80” .
      For the form itself, you’ll need to add a line of code after the initiation of the form (line 85) that would look like this : form.Width = [your value].

      Have a good day!

      Like

      1. That works perfecty! Do you know a site or search I could make in order to find more UI-customizable “settings”? Just for the visual part of the menu.

        Alot of thanks for the quick response!

        Like

  5. Hi !

    I have had run the script correctly . But the problem is that the parameter that I loaded doesnt appear in the selected Category . I tried to loaded manually but appears the revit window : The selected parameter has already been added.

    Then I have look into Project Parameters and click modify . I have notice that the parameter is loaded with the right group parameter but not with the Category which I selected to be loaded . The selected category doesnt appear in the Category list .

    Have a good day!
    Alejandro

    Like

    1. Hi Alejandro,
      Thanks for your comment sorry for the very late reply.
      You’re referring to the “batch add shared paramters script” right?
      What version of Revit/Dynamo are you using and what category/group are you trying to add the parameters to ?

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s