Loop Through a List - Dynaworks Selection Sets

Using Dynaworks I have created a work space that does the following:

  • Open Navisworks file.
  • Gets Selection Sets
  • Converts selection sets to element IDs
  • Applys selection set name to a parameter in Revit for those elements.
It works great with one selection set. When I introduce a second set it changes things.

Essentially, what I am trying to do is run the tasks first for “Test Selection 1” then for “Test Selection 2”… and so on… Logically it sounds like a loop but I am not quite wrapping my brain around how to attack it. If you see in the example I used a GetItemAtIndex to only perform the task for “List Selection 1”… I want that to loop and then perform the tasks for “Test Selection 2”…

Thanks in advance!

 

Selection Sets - List

I have reworked it a little… It might help explain what I am trying to do…

Basically, the code block that is hooked up to the “list.GetItemAtIndex” represents the number selection sets. By flipping though each number “0,1,2” and running Dynamo I am able to apply the correct parameters to the correct elements… I want to automate running through index 0, 1, 2, 3… etc… Not sure if that helps make more sense of it.

Selection Sets - List2

 

 

 

 

 

I decided to make a custom node and then just push the index into it…

SelectionSet - Condensed

Hi @andreatas, you will find the original thread here:
http://dynamobim.org/forums/topic/loop-through-a-list-dynaworks-selection-sets/

please can you share this images again because it’s not available.
also i’m facing the same problem and i’m trying to find a solution

please can you share this images again because it’s not available right know
also i’m facing the same problem and i’m trying to find a solution

@The_Revit_Kid I am new to dynamo. Can you please share this script. Its not visible clearly from the preview how you build this script.