Creating a list of user-picked elements?

Hi all,

what is the best way to create a list of elements picked one by one by the user?

I think I want to use “List.AddItemToEnd” so that the list is ordered by picking sequence.

However, how should I cycle through an unknown numbers of picks from the user?


Thank you

Have you tried the “Tool.GetRevitSelection” node from Steam nodes?

Nice tip, however, even that node does NOT keep the order into which the elements were selected.

I CTRL clicked a bunch of views, in a specific order, but the resulting list of elements has a different order (apparently random, but I am sure Dynamo is following some type or sorting, like the creation time of the views, or the order they were placed on the sheet…)

I will keep looking, but thank you again…



I’m trying to do the same thing. I want to put a value into a parameter of families based on the order they are selected.

There is a “Select Model Elements” node but you only seem to be able to select things with a window, not individual picks.

Surely this possible - I’ve seen Add-ins that do it.

I have a python script that will maintain selected order. Problem is, you have to specify the amount of elements you are selecting so it won;t go in an infinite loop.

Does that sound useful?


If you are selecting them in a particular order I am guessing there should be a way to sort them in that order as well. A parameter or its center point in the model. Just a thought.


John’s script sounds helpful as well.

There’s a better approach as described here by Troy Gates:

in ipy that code would look like this:

This is the exact same post I found as well. I couldn’t get the flag to work though. I spent just about all day on it! Every time I hit escape it jumped out of the command. Dimitar-you adding to springnodes?

I was about to release a small maintenance update of sn this weekend. I could lump this together with it.


That’s pretty good,

i need something similar, only change is every tile i select 2 or three elements enter and go ahead to choose another 2 elements until i press escape.

the result would be like sub-lists of each selection 2 to 3 elements as per my selection as sub-lists.

i hope my explanation is clear,
can this be possible.