Sort by x coordinate

revit

#1

Hi,

I have a number of elements, which I want to arrange in a list by their X coordinates.
I used SortByFunction on Point.X. Then I checked Element.GetLocation, and I see that the X coordinates are not ascending / descending. What am i doing wrong?

thanks


#2

Maybe is this helpfull: