# Room Number to element

**URL:** <https://forum.dynamobim.com/t/room-number-to-element/107477>\
**Category:** Revit\
**Tags:** revit, mep\
**Created:** [January 24, 2025, 11:39am UTC](https://forum.dynamobim.com/t/room-number-to-element/107477 "2025-01-24T11:39:04Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![k.kaest](https://avatars.discourse-cdn.com/v4/letter/k/e9c0ed/32.png) [@k.kaest](https://forum.dynamobim.com/u/k.kaest)\
**Post date:** [January 24, 2025, 11:39am UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/1 "2025-01-24T11:39:04Z")

</div>

Hello everyone,

First of all: I am new to Dynamo.

I am trying to write the room numbers of MEP-rooms into a parameter ‘Kommentare’ of elements.  
Using my current I manage to identify the objects in the MEP rooms using BoundingBox.Contains.

Using the downstream blocks for list formatting, I get a list with all room numbers for which an intersection between the element and the MEP-room was found.

Problem: The order of the room numbers does not correspond to that of the element, so that incorrect room numbers are written to the element.

Presumption: The ID of the element is lost at some point in my script, so that the assignment no longer exists at the end.

Question: Does anyone know the problem or an alternative solution?

 ![250123_Raumnummer_Test_2025-01-24_12-27-40](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/3/f3a35eebe42f12cc5589fe996066549c81ded34a.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:** [January 24, 2025, 12:52pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/2 "2025-01-24T12:52:12Z")

</div>

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

Shouldn’t you fix the `null` first?

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [January 24, 2025, 1:03pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/3 "2025-01-24T13:03:48Z")

</div>

Hi @k.kaest i dont recommend use boundingboxes for rooms or spaces…just use the ootb “is point inside space” node

---

<div class="post-metadata">

**Author:** ![k.kaest](https://avatars.discourse-cdn.com/v4/letter/k/e9c0ed/32.png) [@k.kaest](https://forum.dynamobim.com/u/k.kaest)\
**Post date:** [January 24, 2025, 1:04pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/4 "2025-01-24T13:04:28Z")

</div>

![SC_2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/3/730d44dfc996121a1e52735fb5166fe8c178cb20.png)

Thanks for the feedback.

Basically, the script runs, which can now also be seen on the new screenshot. As described, only the assignment of the room numbers to the elements does not work correctly.

---

<div class="post-metadata">

**Author:** ![k.kaest](https://avatars.discourse-cdn.com/v4/letter/k/e9c0ed/32.png) [@k.kaest](https://forum.dynamobim.com/u/k.kaest)\
**Post date:** [January 24, 2025, 1:07pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/5 "2025-01-24T13:07:49Z")

</div>

Thanks for the tip.

If I see this correctly, ‘Space.IsPointInsideSpace’ also only returns a boolean, so I would get the same result. Or maybe you have an example for me how it could work?

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [January 24, 2025, 1:10pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/6 "2025-01-24T13:10:16Z")

</div>

yes true ,gives boolean…the issue with boundingboexs is these XY aligned…if you share your rvt, i can try 😉 PS i like Mepover is in space node it gives elements

---

<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:** [January 24, 2025, 1:13pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/7 "2025-01-24T13:13:33Z")

</div>

If the Elements are **Loadable** Familes you can use _Room Calculation Point_ function.

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [January 24, 2025, 1:15pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/8 "2025-01-24T13:15:29Z")

</div>

yes but not all mep components have calculation pointl, ex. accesories

---

<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:** [January 24, 2025, 1:19pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/9 "2025-01-24T13:19:57Z")

</div>

Filter the list of spaces by each list in the list of lists of booleans using a List.FilterByBoolMask node rather than the formula node.

An example workflow (one of my standard training things which I had handy):

 ![Elements to Space](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/0/006e7c43bedf2ec88beaf7f17d7248c80d4a4739.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:** [January 24, 2025, 1:20pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/10 "2025-01-24T13:20:21Z")

</div>

I know. Thats why i said **IF** ;).

I agree with @sovitek that using _BoundingBoxes_ isn’t the best  
something like 👇 this should work(?) for _BoundingBoxes._

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

Most important part 👇.

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

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [January 24, 2025, 1:22pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/11 "2025-01-24T13:22:06Z")

</div>

yeah @k.kaest here you have it 😉 probably sometimes need translate the point in z so we are sure it hits the space, depends

---

<div class="post-metadata">

**Author:** ![k.kaest](https://avatars.discourse-cdn.com/v4/letter/k/e9c0ed/32.png) [@k.kaest](https://forum.dynamobim.com/u/k.kaest)\
**Post date:** [January 24, 2025, 1:55pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/12 "2025-01-24T13:55:26Z")

</div>

Thank you very much, unfortunately the script does not work as I had hoped. Space.IsPoint does not return true.

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

---

<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:** [January 24, 2025, 2:04pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/13 "2025-01-24T14:04:13Z")

</div>

Check your lacing and list levels for that node and several thereafter. I noted this in the groups for the sample I posted (see the smaller text).

---

<div class="post-metadata">

**Author:** ![k.kaest](https://avatars.discourse-cdn.com/v4/letter/k/e9c0ed/32.png) [@k.kaest](https://forum.dynamobim.com/u/k.kaest)\
**Post date:** [January 24, 2025, 2:10pm UTC](https://forum.dynamobim.com/t/room-number-to-element/107477/14 "2025-01-24T14:10:13Z")

</div>

Thank you very much for the help! It works!
