Sort Alpha numeric list like revit

I have a schedule in revit that sorts by comments. Revits logic doesn’t need preceding zeros and under stands suffix numbers. How do I get dynamo to sort like this?


@Evan.Pond Try natural sort:

https://forum.dynamobim.com/search?q=natural%20sort%20user:amolshah

1 Like

@AmolShah Thanks! Natural sort is a new term for me that helps me along what I need to do.
Using another post you have I made progress but because my list in not unique List.IndexOf is grabing the same item mulitple times.
Any idea on how to apply this new sort to my list of elements? BTW it is a list of lists.

@Evan.Pond Use the List.SortByKey node and supply List.IndexOf as the key.

Again thanks for the help, I’m getting closer but my list still isn’t quite sorting by comments the way I want.

@Evan.Pond Try switching your inputs on the Sort node:

Thanks again! That worked, looking now I see the second connection says element…

1 Like