Link lists

hi. So, I’m stuck at this point since I don’t understand a lot of the “sortbykey” node. I got 3 lists, 2 of them are ID’s and the other the value of the parameter. I need to correspond the lists of the ID’s, 1 by 1, like, the number 1 needs to be associated to the other 1, the 2 with the 2 , etc … And then link the values to the list. The order of the “values” are in the first pic and the second one is the revit elements list.
In short, the order is the first one, and I need to link the 3 lists.


Show us what you’ve tried so we can see where you need help.

Also, I’d suggest looking into Dictionaries, specifically Dictionary.ByKeysValues from the Springs package and see if that gets you anywhere.

1 Like




Here is what I’ve done. In the end you can see the lists. I need to match the id’s of the elements that came from excel to the list from revit and then associate the value of the diameter to the element.
And after that I need Dynamo to know wich element is wich, from that list, but that is the next step and im stuck here

What have you tried to sort your lists with? You mentioned Sort by Key. Have you tried it?
And just FYI, I wouldn’t recommend making lists of your lists if you don’t need to.

that’s what I’m trying, but thats not a lot of information about that node, still trying to figure out how it works. I’ve made so many lists just to select the data I want and to eleminate the data, or lack of it, that I don’t need

Sort by Key simply sorts two lists at once. It takes one list of items and one list of keys and sorts both lists by the index of the keys. So the keys get sorted naturally and the other list gets sorted to keep indices aligned with the keys list.

2 Likes