Dynamo List Management: Sorting and Data Matching with Sub-Lists... help

Calling Dynamo Gurus,

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.

For example in that post linked above:

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

1 Like

Hi Tim,

I am not sure if i understand you correctly. For “<span style=“font-weight: 300;”>Dictionary Keys” node how it works see this post http://dynamobim.com/forums/topic/loop-while-node-implementation-2/ at the bottom there is a graph which shows that.</span>

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!

Just add three names (Values, Potato chips, Spicy french fries) in code block and it will be there in comments based on your list.count on wall types.

Does this make sense?

 

>Click here for .dyn file<

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!

Hi Tim,

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.

Hello,

Can anybody share " String.SortDuplicateStrings" node.

Thank you,

Hi Preetesh,

You can find “String.SortDuplicateStrings” node from “LunchBox” Package. Good Luck!

Hello KUL KUL,

I did download the latest Lunchbox package . I dint find “String.SortDuplicateStrings” node.

Kindly share the link or upload the node here if possible.

Thank you,

It is there, Try looking manually in library.

 

Hello KULKUL, My dunamo luchbox package dosnt has the list part. asd

 

PLease copy that node from ur C drive n upload it here pls.

very much required.Thank you,

Preetesh, Which Dynamo Version are you using? Try installing other version see below.

Unfortunately that node is not dyf file i think it is from C# i can’t find that node in my C.

I am using dynamo version 9.1

Is this the correct link

 

Send me the link

or send me the downloaded file .

Last part of my work is waiting , if i get this node its done. Thank you,

Got it KULKUL. Thank you soo much.