# Mark walls by XY position - Unique sublists

**URL:** <https://forum.dynamobim.com/t/mark-walls-by-xy-position-unique-sublists/28244>\
**Category:** Lists-Logic\
**Created:** [November 9, 2018, 11:29am UTC](https://forum.dynamobim.com/t/mark-walls-by-xy-position-unique-sublists/28244 "2018-11-09T11:29:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julian\_Krab](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/julian_krab/32/55128_2.png) [@Julian\_Krab](https://forum.dynamobim.com/u/Julian_Krab)\
**Post date:** [November 9, 2018, 11:29am UTC](https://forum.dynamobim.com/t/mark-walls-by-xy-position-unique-sublists/28244/1 "2018-11-09T11:29:28Z")

</div>

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?

 ![Unique%20sublists%20-%20assign%20mark](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/c/cc884c7526b143c7fe518968fce2baf22f7627e0.png)

[Mark all walls by XY position v1.dyn](https://forum.dynamobim.com/uploads/short-url/sYSSSZhofWWu07P0juRpUNgMw8Q.dyn) (15.0 KB)

[Walls dummy.rvt](https://forum.dynamobim.com/uploads/short-url/nnzwwVdCFc7UGWFqgvHzBbZYF0L.rvt) (2.0 MB)

---

<div class="post-metadata">

**Author:** ![Jan\_Secnik](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jan_secnik/32/55692_2.png) [@Jan\_Secnik](https://forum.dynamobim.com/u/Jan_Secnik)\
**Post date:** [November 9, 2018, 11:52am UTC](https://forum.dynamobim.com/t/mark-walls-by-xy-position-unique-sublists/28244/2 "2018-11-09T11:52:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Julian\_Krab](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/julian_krab/32/55128_2.png) [@Julian\_Krab](https://forum.dynamobim.com/u/Julian_Krab)\
**Post date:** [November 9, 2018, 12:12pm UTC](https://forum.dynamobim.com/t/mark-walls-by-xy-position-unique-sublists/28244/3 "2018-11-09T12:12:58Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/d/fdd3b80ca681f17d8832fd32f6510883bc37f3b2.png)

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [November 9, 2018, 12:26pm UTC](https://forum.dynamobim.com/t/mark-walls-by-xy-position-unique-sublists/28244/4 "2018-11-09T12:26:48Z")

</div>

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](https://forum.dynamobim.com/uploads/short-url/81zOIWiKiA8oangGNYhoIlDEbDd.dyn) (23.7 KB)

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/c/5cbfe383e6e03d6f7315b216d53d4f4c64ea2e72.png)

---

<div class="post-metadata">

**Author:** ![Julian\_Krab](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/julian_krab/32/55128_2.png) [@Julian\_Krab](https://forum.dynamobim.com/u/Julian_Krab)\
**Post date:** [November 9, 2018, 12:55pm UTC](https://forum.dynamobim.com/t/mark-walls-by-xy-position-unique-sublists/28244/5 "2018-11-09T12:55:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mellouze](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@mellouze](https://forum.dynamobim.com/u/mellouze)\
**Post date:** [November 9, 2018, 1:05pm UTC](https://forum.dynamobim.com/t/mark-walls-by-xy-position-unique-sublists/28244/6 "2018-11-09T13:05:34Z")

</div>

I think you can get some inspiration in this topic :

> [@Set 'Mark' parameter to all elements in all model groups](https://forum.dynamobim.com/t/set-mark-parameter-to-all-elements-in-all-model-groups/2892):
>
> [[Wall select] ](http://dynamobim.org/wp-content/uploads/forum-assets/l-leeraarvanwijnen-nl/01/11/Wall-select.jpg) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 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…

---

<div class="post-metadata">

**Author:** ![Julian\_Krab](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/julian_krab/32/55128_2.png) [@Julian\_Krab](https://forum.dynamobim.com/u/Julian_Krab)\
**Post date:** [November 9, 2018, 3:50pm UTC](https://forum.dynamobim.com/t/mark-walls-by-xy-position-unique-sublists/28244/7 "2018-11-09T15:50:09Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/d/6df437b5fb9ec9a248ec0e0cbc96a3e1e653e62a.png)

Final dynamo file attached.[Mark all walls by XY position v3.dyn](https://forum.dynamobim.com/uploads/short-url/6Hpd0J0kuyUo3uMPglLip4ztZ7D.dyn) (25.8 KB)
