Sort List in specific way

#1

Hi, All. I am new to Dynamo. I am trying to sort this list in an very specific way. As you can see this list comprised letter with number. I want to sort list as R1, Y1, B1, R2, Y2, B2, R3, Y3, B3… It will be very grateful if any one having the solution.
Sort List

Thanks,
Ilayaraja P

0 Likes

#2

I don’t have time at the moment but here are links that could help your first experiments:
http://dictionary.dynamobim.com/#/Core/List
http://dictionary.dynamobim.com/#/Core/String
http://dynamoprimer.com/en/04_The-Building-Blocks-of-Programs/4-4_strings.html

1 Like

#3

@pilayaa This should work as long as each item has only two characters


20171027-1.dyn (9.7 KB)

1 Like

#4

Thanks @Yna_Db and @Vikram_Subbaiah for your quick and valuable response.

0 Likes

#5

Please take also the time to read the forum guidelines, as an introduction to the community, you will find there very good advice that will be useful to your future requests :slight_smile:

0 Likes

#6

@pilayaa
I assume you want your list to start with R …


reviewed version

0 Likes

#8

@simoneavellini
You are right. I want the list to start with R. So I just modify the key order from 1,2,0 to 2,1,0. Now I got the list as my requirement. Thanks for your suggestion.

0 Likes

#9

@Vikram_Subbaiah
In addition to this I have a list and its relevant Element list. I want it in a specific order. In Image-1 you can see the circuit number and its Element list. In Image-2 Circuit number in the specific order. I want the Element list based on the circuit list. Hope you guys have the solution.
List 1

List 2

0 Likes

#10

You can try the dictionary method for that:

1 Like

#11

@pilayaa Filter, Group and Sort the corresponding elements as you go along
Not sure if I’ve got this right, but hope I’ve managed to convey the idea…


20171102-1.dyn (15.5 KB)

1 Like

#12

Thanks @Vikram_Subbaiah, This is what I want.
Thanks @Yna_Db for your suggestion. You guys are great.
Currently I am working on the customized Electrical DB Schedule. This is the part of it.

1 Like

#13

@Yna_Db thanks for the solution.

0 Likes