# Renumbering Rooms Clockwise

**URL:** <https://forum.dynamobim.com/t/renumbering-rooms-clockwise/113001>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [November 8, 2025, 12:55pm UTC](https://forum.dynamobim.com/t/renumbering-rooms-clockwise/113001 "2025-11-08T12:55:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![DamirCesko82](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@DamirCesko82](https://forum.dynamobim.com/u/DamirCesko82)\
**Post date:** [November 8, 2025, 12:55pm UTC](https://forum.dynamobim.com/t/renumbering-rooms-clockwise/113001/1 "2025-11-08T12:55:48Z")

</div>

Hello dear community,

I wonna make script which renumbering Appartment rooms from entry room to clockwise, from left to rigt in a circle. I made a center point of apartment and connected to every central point of room. I have these vectors and now don’t know how to go clockwise. Does anyone knows how that goes?

Thank you in advance for your reply :)..

Damir

 ![Renumbering Rooms Clockwise](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/8/8880b32658c3ced0dfad51795c0c31f02ad69291.png)

 ![Renumbering Rooms Clockwise Sketch](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/6/b6991476dd66630c312740d6b8ce318f496233fc.png)

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [November 8, 2025, 1:31pm UTC](https://forum.dynamobim.com/t/renumbering-rooms-clockwise/113001/2 "2025-11-08T13:31:09Z")

</div>

hi

 ![rep25_11_08](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/f/ef6746590c33ecbeb05b3cde74ddd8011be16195.png)

edit: Point.Average comes from the Clockwork package (center of gravity of other points)

cordially

christian.stan

---

<div class="post-metadata">

**Author:** ![DamirCesko82](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@DamirCesko82](https://forum.dynamobim.com/u/DamirCesko82)\
**Post date:** [November 9, 2025, 10:10am UTC](https://forum.dynamobim.com/t/renumbering-rooms-clockwise/113001/3 "2025-11-09T10:10:49Z")

</div>

Christian, thank you very much for you answer. It works.

Now I am trying to start that renumbering from the appartment entry room (Entry door is intersecting choosen room) but I have problem sorting those ones and finishing with proper renumbering. Can you please check? Probably my licing doesn’t go right.

Thank you in advance for your reply :)…

 ![Renumbering Rooms Clockwise with Entry door Sketch](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/4/c4d77435ec16321cf8932957ce0cad6fe98b38ac.png)

 ![Renumbering Rooms Clockwise from Entry Room over entry door](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/4/342eacbad2511a1818300c9de8a0ae6e6f0d7a88.png)

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [November 9, 2025, 4:11pm UTC](https://forum.dynamobim.com/t/renumbering-rooms-clockwise/113001/4 "2025-11-09T16:11:22Z")

</div>

That should do the trick (I’m not entirely confident in what I’m saying)

 ![Renumbering Rooms Clockwise from Entry Room over entry door v 2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/d/fd9fe89334e6ff35f4d1be384849f2f96f06d2be.jpeg)

Sorry I can’t do better.  
Sincerely, Christian Stan

---

<div class="post-metadata">

**Author:** ![DamirCesko82](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@DamirCesko82](https://forum.dynamobim.com/u/DamirCesko82)\
**Post date:** [November 9, 2025, 5:53pm UTC](https://forum.dynamobim.com/t/renumbering-rooms-clockwise/113001/5 "2025-11-09T17:53:31Z")

</div>

Thank you Christian. Sorry but unfortunately I can’t see from low picture resolution two nodes that you add above. Can you just write it which ones are they? Thanks

Damir

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [November 9, 2025, 8:03pm UTC](https://forum.dynamobim.com/t/renumbering-rooms-clockwise/113001/6 "2025-11-09T20:03:54Z")

</div>

Indexof et getitematindex

I would go more in this direction:

when you have the pieces with doors, I sort them according to their angular value, using your desired first door as a starting point,

and then I send this to a Python node. If my door is A1, I send all the pieces with A1, and so on. Once I’ve sorted them into sublists,

I flatten and then number them.

I’ll try to do an example tomorrow around the same time if this message is unclear.

Regards, Christian Stan.

---

<div class="post-metadata">

**Author:** ![DamirCesko82](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@DamirCesko82](https://forum.dynamobim.com/u/DamirCesko82)\
**Post date:** [November 9, 2025, 8:15pm UTC](https://forum.dynamobim.com/t/renumbering-rooms-clockwise/113001/7 "2025-11-09T20:15:57Z")

</div>

Thank you. I will try with Index Node and if I don’t succeed will let you know.

I wish you nice evening :).

---

<div class="post-metadata">

**Author:** ![christian.stan](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/christian.stan/32/166296_2.png) [@christian.stan](https://forum.dynamobim.com/u/christian.stan)\
**Post date:** [November 10, 2025, 6:31pm UTC](https://forum.dynamobim.com/t/renumbering-rooms-clockwise/113001/8 "2025-11-10T18:31:02Z")

</div>

Hi,  
I don’t know if this worked as I said yesterday, here it is:

I didn’t use Bimorph, I don’t have

(a little shortcut to put yourself in the same conditions as you when starting your script)

 ![25_11_10 rep pieces reoorder_2025-11-10_07-18-17](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/7/678dc61269ec3ba7cb6cf550684c6e25fc4cb39c.png)

Python script

```auto
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('RevitAPI')
import Autodesk.Revit.DB
from Autodesk.Revit.DB import *

rooms=UnwrapElement(IN[0])
room_etalon=UnwrapElement(IN[1])
para=IN[2]

def test(rooms,re,para):
    l=[]
    l.append(re)
    for r in rooms:
        if r.LookupParameter(para).AsString() == re.LookupParameter(para).AsString():
            l.append(r)
    return l

OUT = [test(rooms,re, para) for re in room_etalon]

```

 ![Capture d’écran 2025-11-10 191840](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/b/8b0096a8deb686df7e511591935372be32a69e0f.jpeg)before

after script

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

[25\_11\_10 rep pieces reoorder.dyn](https://forum.dynamobim.com/uploads/short-url/fwZKlybKM9ftvLcH1KNNF0hNc7j.dyn) (52.7 KB)

Regards, christian.stan

---

<div class="post-metadata">

**Author:** ![DamirCesko82](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@DamirCesko82](https://forum.dynamobim.com/u/DamirCesko82)\
**Post date:** [November 11, 2025, 8:15am UTC](https://forum.dynamobim.com/t/renumbering-rooms-clockwise/113001/9 "2025-11-11T08:15:58Z")

</div>

Thank you @christian.stan very, very much. Everything works.

As we are in Belgrade saying “Ti si dečko car!”, it’s like “You’re a imperator” :)…

I will mark your last reply as solution because you gave me(us) the whole solution.

I wish you nice day 🙂
