I’m trying to get my head around list management in Dynamo. I understand there are a set of tools like ‘Dictionary’ ‘Keys’ and more that I found on a recent post here:
I am so used to the sort style of Grasshopper by being able to sort lists at the root level and make correlations within the grouped branches of data that Dynamo list sorting is giving me a real headache. I think there’s maybe 1 or 2 steps I’m missing to understand this.
How would the Indices be used to target and transform Revit Elements and reapply new parameter values based on these sorting/filtering methods? The biggest thing is let’s say I have list index [0] with 1 set of elements. I’ve also been able to successfully filter down my desired values and have them on a corresponding list at index [0], how can I match up values to parameters to elements?
The other big question is how can I sort the root sub-list and have them based on the values and make the corresponding Revit elements get sorted exactly the same. Data matching in Dynamo is giving me some serious frustrations.
Any thoughts? All the best.
-Tim
And for your big question how to sort the root sub-list using “Strings.SortDuplicateStrings” node from LunchBox Pacakge see below example of walls. Hope it helps! Good Luck!
Thanks for the reply KulKul! The definition you posted is almost all the way there for what I am after. The desire would be to swap in values to match it’s corresponding list. So instead of “Values” being repeated into the comments parameter on every wall, I could have List [0] be “Values” List [1] be “Potato Chips” and List [2] be “Spicy French Fries”. In one step the input comments would match to all the wall elements on there respective index. How would I tweak what you’ve shown here to do something like that? Thanks again for your input!
I have got it solved. There was some details with how the components needed the lacing to be set to ‘Longest’ which I have highlighted in the definition. Also, instead of re-extracting the elements by name, the order got mixed up and lists not processing appropriately. So I packaged the names and elements together, filtered by name, but pulled through the elements by that filter and then applied the comments to their corresponding group of walls. The big thing was just knowing when to use ‘Longest List’ sorting for things to run correctly. Thanks for the pointers!
Good to know that you have solved your issue. My graph is just to let you know how “String.SortDuplicateStrings” works you can play around upon your requirements. Can you just mark this post as resolved.