# Floor.GetRoom | Get the room a floor is located within

**URL:** <https://forum.dynamobim.com/t/floor-getroom-get-the-room-a-floor-is-located-within/63617>\
**Category:** Revit\
**Created:** [May 5, 2021, 9:13am UTC](https://forum.dynamobim.com/t/floor-getroom-get-the-room-a-floor-is-located-within/63617 "2021-05-05T09:13:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jannis](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@Jannis](https://forum.dynamobim.com/u/Jannis)\
**Post date:** [May 5, 2021, 9:13am UTC](https://forum.dynamobim.com/t/floor-getroom-get-the-room-a-floor-is-located-within/63617/1 "2021-05-05T09:13:23Z")

</div>

Hi 🙂  
I wish to get some data from my floors and write it to the rooms in which they are located. I thought this would be easy, but I run into way more problems than I thought. These are my approaches:

Version 1: Room Boundaries does not list any of the floors (in this project)

Version 2: EndPoints of random boundarycurve finds just some rooms, but not all.

Version 3: I wish to take the midpoint of the surface. This finds way more rooms, but the midpoint of some hallways isn’t correct. I always use the “Room.IsInsideRoom”-Node to check if the point is within the Room Boundaries.

Version 4: Using Surface.PointAtParameter which spits out Points which aren’t on the surface, as well ☹

Is there a way to get the corresponding Room to a floor with high precision and low calculation? I thought about creating random points on these surfaces and check if they are intersecting with the room surfaces and then check with these points.

I attached my quite chaotic testfile 😉  
[Floor.GetRoom.dyn](https://forum.dynamobim.com/uploads/short-url/eJLIRJawYehF5uWLMTpq4ccZ7zT.dyn) (74.1 KB)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/9/195341d26fb4526dd946136093df0431fb2c6c8c.png)
