Dynamo script run based on multiple inputs/list of combination

Hello,

I have developed Dynamo script to count Revit element which is have two parameters and it is working fine.
Link of post :https://forum.dynamobim.com/t/filter-out-elements-by-multiple-parameters-similar-as-revit-filter/84589

To run above script I need two parameters. (Input A and Input B).
for input A i have 1 list (refer below snap Blue box) and for input B i have another list of 100 tags (Refer orange box)

Currently using below step to run script :

  1. manually entering “A_” in purple in input A (Green box)
  2. manually entering one by one “EG-0001, EG-0002,…EG-0100” in purple in input B (Green box)
  3. manually entering “B_” in purple in input A (Green box).
  4. repeating step 2.

Now I want to create script for avoid above mentioned step.
any guide on above is much appreciated.

Thanks and regards.

I’m not sure i fully understand. Are you trying to have the user input the A…F and EG-?

Do you know Data-Shape Packages?
Let’s try use it to create user interface. I think it’s better if you dont know Python and WindowsForm

Multi User Input Form with Dynamo – data|shapes (data-shapes.io)

1st run :
Input A = A_
Input B = EG-001

2st run :
Input A = A_
Input B = EG-002
.
.
.
Next run :
Input A = B_
Input B = EG-001

last run :
Input A = F_
Input B = EG-100

so i have to run this script multiple time. which is not best way to use dynamo.
I want dynamo to automate both the input entry with possible combination of 2 list.

not 100% sure what you going for here but maybe somethig like this?

1 Like

I just want to know, how can I run script of each listed inputs ?

Which Elements need to get the values of run 1, which the value of run 2 and so on?
If we know that we have and idea how to do that in 1 run.
I think you should be able to make things work with all the suggestions people made.

If not then you really should be more clear / specific. I also struggle with your question.

1 Like


maybe?

1 Like

I think OP also needs (wants) to group his Elements (in his case Electrix Fictures [EF]) by a key too.

Looks like OP got EFs in different ‘sectors’ and needs to write a value based of the ‘sector’ a EF is in.
This is an assumption based of the screenshots in the opening post.

1 Like

do you mean how do i get those lists in to the input nodes?

if that is what you mean, you dont plug them into the input nodes. delete the input nodes and just plug the list nodes directly into the nodes you want,

1 Like

You should be able to pull the lists of inputs into the == node directly if you adjust the list lacing to longest and set the first input to level 1 (@@L1). Assuming n elements were selected, you would get a list of n sublists containing a boolean for each input A and input B value.

From there you can use a List.AnyTrue node set to @L2 for the input to get a single boolean value for each element. You can then sure those into your && node and move on with the graph.

The direct connection node not working.
I think I need to develop a new script using the group node.
But again I have two lists.
List 1 contains 6 different inputs.
List 2 contains 100 inputs.
total possible inputs are (6 x 100 = 600).
I have to run the script for all those 600 inputs.
Just want to avoid entering those 600 inputs

See the below GIF ?: Currently, I am following this.
by doing this way it will take too much time.

Animation
Home.dyn (26.5 KB)

I have tried this by creating groups but, again I have to write multiple scripts for all possible combinations.

as i said before dont use the input nodes. see picture below.


plug in the groups seperetly.

1 Like