Sorting walls

Hello to all, I am trying to sort my REvit walls from same level by horizontal (x-ax) and vertical (y-ax) alignment and others that are placed by angle. I have this idea to check wall vector and compare it to x axis . That way i can get the ones that are 0 90 180 degrees and the ones that are in diferent angle from X axis.

And i need some ideas for developing this, sort by angle and later divide in 3 lists.

Thanx in adavance.

.

You could use an If node within an If node, something like:

x==0? 1 : (x==90? 2: (x==180? 3: 4));

It would give you keys you could sort by, with 1 being x = 0, 2 is x=90, etc.

Using sortbykey first gets you the groups in the order you could choose.

Q. Do you know why Iā€™m getting this Code Block error? error wm_class

Thanks

What version of Dynamo are you using?

Hi @Rob_Cross

Change opening and closing brackets( ā€œ[ā€ ā€œ]ā€ ) to opening and closing braces ("{" ā€œ}ā€) for dynamo 1.3.x

1 Like