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)
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.
Not sure if I understand you, but GroupByKey doesn’t return me anything usable in my opinion.
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)
In the end, how do I assign mark by groups ? As in this example, walls in list 0 must have same mark.
I think you can get some inspiration in this topic :
Hi, I recently started to work with Dynamo 0.9 for Revit 2016. I’d like to fill in the mark of all wall elements from a walltype in all groups in the model. (1 visible in the view, 20 groups not) Is this possible not using Python? Just Dynamo…
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)