Sorting a List at a specific Level

Hi,

I have some elements in Revit such as Walls, Floors, Columns etc. I import them into Dynamo and sort them by a parameter called Segment, which I have defined in Revit.

I would like to extract all of the points of each group and then sort the points based on their X-coordinates.

Below you see the expanded node Watch. So the list[0] @Level2 containts all of the points belonging to the elements of group 0, the list[1] @Level2 containts all of the points belonging to the elements of group 1 and the list[2] @Level2 containts all of the points belonging to the elements of group 2.

Now I would like to sort the points based on their x-coordinates under every group, by keeping the group assignments to the points.

It is neither possible by List.SortByKey as you see above (see the error message please!) nor by the Points.SortByXY Node from Landform package.

Does anybody have any idea?

Thank you.

Have you tried using the List.SortByKey from the Ampersand Package?

2 Likes

Thank you very much.