Mark walls by XY position - Unique sublists


#1

Hi,
I am trying to mark walls by their X and Y position in the project. Some walls are in the same XY position, but different elevation - they need to have the same mark.
So I get a list with sublists for X point
and a list with sublists for Y point

How do I assign same mark if both XY sublists at specific index are the same in the list?

Mark all walls by XY position v1.dyn (15.0 KB)

Walls dummy.rvt (2.0 MB)


#2

Easy solution for this is, first Group elements by X value, using Group.ByKey node. Group grouped elements using Y value. I would attach a picture, but Im not at my PC.


#3

@Jan_Secnik
Not sure if I understand you, but GroupByKey doesn’t return me anything usable in my opinion.


#4

Try with these inputs for the List.GroupByKey node:

  • list input : The elements you want to tag (output of all elements of category)
  • keys input : The couples XY (output of List.Combine in your first screenshot I guess)

Edit : Important --> You will not group walls that have not been drawn in the same direction, as their end point and start point will be reversed

Mark all walls by XY position v2.dyn (23.7 KB)


#5

Thanks @mellouze
In the end, how do I assign mark by groups ? As in this example, walls in list 0 must have same mark. :slight_smile:


#6

I think you can get some inspiration in this topic :


#7

ok this is how I assign mark per group, it works:

Final dynamo file attached.Mark all walls by XY position v3.dyn (25.8 KB)