# Creating sublists from list of floors of equal parameter values

**URL:** <https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901>\
**Category:** Revit\
**Tags:** revit, geometry, dynamo\
**Created:** [March 2, 2023, 8:25pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901 "2023-03-02T20:25:04Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![enji.sorial](https://avatars.discourse-cdn.com/v4/letter/e/b9e5f3/32.png) [@enji.sorial](https://forum.dynamobim.com/u/enji.sorial)\
**Post date:** [March 2, 2023, 8:25pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/1 "2023-03-02T20:25:04Z")

</div>

I am trying to create a list from the floor list I already have that have equal “Height offset from Level” parameter values, so I can assign colors to each sublist, but don’t know what is the next node in the logic should be.

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

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [March 2, 2023, 8:59pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/2 "2023-03-02T20:59:23Z")

</div>

From what I understand from your question you need the **list.groupbykey** node.

---

<div class="post-metadata">

**Author:** ![enji.sorial](https://avatars.discourse-cdn.com/v4/letter/e/b9e5f3/32.png) [@enji.sorial](https://forum.dynamobim.com/u/enji.sorial)\
**Post date:** [March 3, 2023, 12:16pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/3 "2023-03-03T12:16:00Z")

</div>

And that will make me create lists from the existing one with equal values of parameter “Height Offset From Level” ?

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [March 3, 2023, 12:27pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/4 "2023-03-03T12:27:38Z")

</div>

It will group the Elements with, in this case, the same Elevation yes.

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [March 3, 2023, 1:39pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/5 "2023-03-03T13:39:52Z")

</div>

> [@bvs1982](#):
>
> From what I understand from your question you need the **list.groupbykey** node.

If this is the solution, then please mark it. @enji.sorial

---

<div class="post-metadata">

**Author:** ![enji.sorial](https://avatars.discourse-cdn.com/v4/letter/e/b9e5f3/32.png) [@enji.sorial](https://forum.dynamobim.com/u/enji.sorial)\
**Post date:** [March 3, 2023, 1:44pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/6 "2023-03-03T13:44:38Z")

</div>

I still have to assign a color to each list. So do I flatten the list.groupbykey then start to assign colors to each list?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/e/7e7672a8a31c36b5d9aaef28a48832f4130f6544.png)

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [March 3, 2023, 1:46pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/7 "2023-03-03T13:46:34Z")

</div>

Depend if you want them to have different colors.

---

<div class="post-metadata">

**Author:** ![enji.sorial](https://avatars.discourse-cdn.com/v4/letter/e/b9e5f3/32.png) [@enji.sorial](https://forum.dynamobim.com/u/enji.sorial)\
**Post date:** [March 3, 2023, 1:47pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/8 "2023-03-03T13:47:30Z")

</div>

Yes, that’s exactly what I want. I want each list of floors that have same elevation have a different color.

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [March 3, 2023, 1:50pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/9 "2023-03-03T13:50:04Z")

</div>

So you need a node which can override the elemtents and feed that node a list of colos  
tand he list with the sublists of the different elevations.

**PS**  
Your original question has been answered though.

---

<div class="post-metadata">

**Author:** ![enji.sorial](https://avatars.discourse-cdn.com/v4/letter/e/b9e5f3/32.png) [@enji.sorial](https://forum.dynamobim.com/u/enji.sorial)\
**Post date:** [March 3, 2023, 1:56pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/10 "2023-03-03T13:56:31Z")

</div>

Exactly. I am new to Dynamo, so at the beginning I was struggling to find the node to group the floors with equal parameter values. I found another script on Dynamo where it assigns colors to elements. With Dynamo I usually get the beginning of the script and partially the end and always miss something in the middle.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/0/80d0b5f6fb8e56d78a284dd59a9914003974e3c7.png)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 3, 2023, 6:06pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/11 "2023-03-03T18:06:02Z")

</div>

If you want them colored by unique value (group) then you need to create a color for each value. You can do this with a sequence of _n_ unique values long with the color range node. Then assign the color override to each group.

---

<div class="post-metadata">

**Author:** ![enji.sorial](https://avatars.discourse-cdn.com/v4/letter/e/b9e5f3/32.png) [@enji.sorial](https://forum.dynamobim.com/u/enji.sorial)\
**Post date:** [March 9, 2023, 7:16pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/12 "2023-03-09T19:16:00Z")

</div>

But do I need to make sublists to assign a color to floors with equal parameter values?

This is what I have so far?

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

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [March 9, 2023, 7:26pm UTC](https://forum.dynamobim.com/t/creating-sublists-from-list-of-floors-of-equal-parameter-values/86901/13 "2023-03-09T19:26:05Z")

</div>

See @Nick_Boyts reply @enji.sorial.

> [@Nick\_Boyts](#):
>
> If you want them colored by unique value (group) then you need to create a color for each value.  
> Then assign the color override to each group.

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