Sort All Dictionary Values (Lists) according to the specific List

Hello there!

In other words, I want to sort all other lists (“Family” list, “Time per unit, hour” list, etc.) according to
the “Order in construction” list

,
so that the new Family list (as well as other lists) going to like as follows:
Family List:

  • Trays;
  • Cable;
  • Panelboard
  • Electrical Fixtures

Thanks

hi
you can use SortByKey node @L2, and the key is order in construction list, get it by GetItemAtIndex node, and to do it for all list use lace longest on SortByKeys node or you can repeat the order list

upload the file here if you want

Hi @khuzaimah.ElecEng,
Thank you for your reply. Here is the file Example.dyn (9.0 KB)

i think you should sort them before use dictionary , like this

1 Like

The logic must work, but why I get sorted only the first list (in my example)?

on the node (SortByKey) right click then Lacing, choose longest

1 Like

@khuzaimah.ElecEng Amazing! :slightly_smiling_face: