Sort a sublist

Hi guys.

How can I sort/reorder a sub list?
I want to give my doors a number according to X and Y
To get the number according to X is no problem, but often there are many doors that have the same x value.
If the door have the same x value, I want to sort them according Y value.
I,ve try differnetly, but nothing works for me. I’m stuck
Help please.

Hi @Bardur_Thomassen

you were pretty close :slight_smile: :

there’s probably a better way to do it though…

You could make life easier for yourself by not extracting X and Y.

If it’s doors that you need to sort, connect the list of doors to the list input port of List.SortByKey and the list of door location points to the point input port of Point.X.

Thank you both, I’m so close now(i think)

Is only 1 problem. I must get this points to sort my door elements.
The points value in not a value in the all door element.
When I only got door in a wall, there was no problem to get the door location in the wall, but when it is a door in a curtainwall it cound no figure the location in the curtain wall.
So with boundinbox and a litle math, I have make a list with ALL door location on the wall.
I can imagen it is easy, when you know what to do.
Is it a big problem or?

Hurðanummar.dyn (53.5 KB)

This should do the needful…
Hurðanummar-20160618-1.dyn (12.9 KB)

That was it… Thank you very much Virkam and Mostafa.
It feels good when it works:)


1 Like