# Room numbers to Door

**URL:** <https://forum.dynamobim.com/t/room-numbers-to-door/50288>\
**Category:** Uncategorized\
**Created:** [May 6, 2020, 9:46am UTC](https://forum.dynamobim.com/t/room-numbers-to-door/50288 "2020-05-06T09:46:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![reklund84Z3BRG](https://avatars.discourse-cdn.com/v4/letter/r/d07c76/32.png) [@reklund84Z3BRG](https://forum.dynamobim.com/u/reklund84Z3BRG)\
**Post date:** [May 6, 2020, 9:46am UTC](https://forum.dynamobim.com/t/room-numbers-to-door/50288/1 "2020-05-06T09:46:02Z")

</div>

Hello,  
I’ve used a node from Rythm to sort out doors and rooms that have a connection. I now want to add a number behind this information so that you can see how many doors that belongs to a certain room. I’m stuck on how to solve the last bit, how to append the running number. I guess I could write to excel and then read from excel but I’m looking to automate the whole process if possible?

Thank you,  
Rickard

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/2/32ddecc923f30b85e0d61a78ee800ebc75bc2752.jpeg)[DoorTagByRoom.dyn](https://forum.dynamobim.com/uploads/short-url/jxLfxD8dFQos5mi1LIvtzeVs7Dc.dyn) (12.3 KB)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 6, 2020, 10:04am UTC](https://forum.dynamobim.com/t/room-numbers-to-door/50288/2 "2020-05-06T10:04:17Z")

</div>

One nudge in the right direction: Try a List.GroupByKey instead of a sort by key. Then a List.Count, number range, and join.

List lacing and list levels will matter here. 🙂

---

<div class="post-metadata">

**Author:** ![reklund84Z3BRG](https://avatars.discourse-cdn.com/v4/letter/r/d07c76/32.png) [@reklund84Z3BRG](https://forum.dynamobim.com/u/reklund84Z3BRG)\
**Post date:** [May 11, 2020, 11:30am UTC](https://forum.dynamobim.com/t/room-numbers-to-door/50288/3 "2020-05-11T11:30:34Z")

</div>

Thank you Jacob!  
I really had to think and spend som time with this one :). This is my solution. I guess you could have done this without the python node I just couldn’t figure out how. Anyhow, this solution worked. Thank you again for your input Jakob.

Python node below:

```
**# Load the Python Standard and DesignScript Libraries**
 **import sys**
 **import clr**
**clr.AddReference('ProtoGeometry')**
 **from Autodesk.DesignScript.Geometry import***

**# The inputs to this node will be stored as a list in the IN variables.**
 **dataEnteringNode = IN**

**# Place your code below this line**
**lst_rooms=IN[0]**
**lst_doors=IN[1]**

**list_names=[]**

**for i in range(len(lst_rooms)):**
**	list_names.append(str(lst_rooms[i])+"."+str(lst_doors[i]))**

**# Assign your output to the OUT variable.**
 **OUT = list_names**

```

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/9/19fe564c024f5c96fa8d67ba878a29017034c3bf.jpeg)

---

<div class="post-metadata">

**Author:** ![Bjorn\_Keulemans1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bjorn_keulemans1/32/54676_2.png) [@Bjorn\_Keulemans1](https://forum.dynamobim.com/u/Bjorn_Keulemans1)\
**Post date:** [May 11, 2020, 11:50am UTC](https://forum.dynamobim.com/t/room-numbers-to-door/50288/4 "2020-05-11T11:50:12Z")

</div>

![2020-05-11_1347](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/5/85c9d349460d379fdbd0bc4c90faf945e3d29676.png)

---

<div class="post-metadata">

**Author:** ![reklund84Z3BRG](https://avatars.discourse-cdn.com/v4/letter/r/d07c76/32.png) [@reklund84Z3BRG](https://forum.dynamobim.com/u/reklund84Z3BRG)\
**Post date:** [May 11, 2020, 12:03pm UTC](https://forum.dynamobim.com/t/room-numbers-to-door/50288/5 "2020-05-11T12:03:48Z")

</div>

Thank you Bjorn!  
I tested it and the output is excatly the same, very nice! I learned something new there.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/1/0122ca57eb28985f75b99d4d52d2ac8b99c2be32.jpeg)
