Issue with sorting Sheet Numbers: Dynamo string sort vs Revit natural sort

Hi everyone,

I’m working on a graph to sort sheets by their Sheet Number, but I’ve run into a sorting logic discrepancy between Dynamo and Revit native schedules.

As you can see in the attached screenshot:

  • In the Revit Schedule (right side): The sheets are sorted naturally (A.1, A.2, …, A.9, and then A.10).

  • In Dynamo (left side): Using the standard List.SortByKey node, it performs a strict string sort, placing A.10 right after A.1, and pushing A.2 below it.

Does anyone know of a custom node, a specific package, or a Python snippet that can achieve “Natural Sorting” in Dynamo so the list order matches exactly how Revit handles it?

Thanks in advance for your help!

The locale’s sort natural node works correctly; however, it returns a string value, causing an error for the set parameter node. Is there a way to sort correctly and return an elementer value?

Dictionaries can work.

2 Likes

Thank you for your kind help; I have successfully completed the project. Here are images of my nodes.