# Room name Parameter to Area Name Parameter

**URL:** <https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [October 29, 2024, 10:32pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497 "2024-10-29T22:32:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khush.P](https://avatars.discourse-cdn.com/v4/letter/k/85e7bf/32.png) [@Khush.P](https://forum.dynamobim.com/u/Khush.P)\
**Post date:** [October 29, 2024, 10:32pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/1 "2024-10-29T22:32:19Z")

</div>

Hello,  
I had a script in Dynamo of assigning Room Name Parameter Data to Area Name Parameter.  
But, there were Phases Filter nodes in it, which I deleted as I didn’t need those, but the script gives a lot of warnings and doesn’t run.  
Can you help me with the script, I do not want the Phases Filter as my Project is in a single phase.  
It’s not allowing me to attach the .dyn file or script.  
@jacob.small

---

<div class="post-metadata">

**Author:** ![Khush.P](https://avatars.discourse-cdn.com/v4/letter/k/85e7bf/32.png) [@Khush.P](https://forum.dynamobim.com/u/Khush.P)\
**Post date:** [October 29, 2024, 11:16pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/2 "2024-10-29T23:16:16Z")

</div>

[Room name to Area Name Parameter.dyn](https://forum.dynamobim.com/uploads/short-url/brC9cpyKK0NmkzJGBIXQxKtw5NI.dyn) (51.6 KB)  
[Room name to Area Name - Original with Phases.dyn](https://forum.dynamobim.com/uploads/short-url/5klN1WjCu8oSSg5EGlQX4vVWjsP.dyn) (74.9 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:** [October 29, 2024, 11:16pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/4 "2024-10-29T23:16:57Z")

</div>

Welcome to the forum @Khush.P.

I bumped your trust level so you should be able to attach files once your cache clears. If not or if the files are too large you can use a 3rd party service like onedrive, Dropbox, Google drive, box, etc…

---

<div class="post-metadata">

**Author:** ![Khush.P](https://avatars.discourse-cdn.com/v4/letter/k/85e7bf/32.png) [@Khush.P](https://forum.dynamobim.com/u/Khush.P)\
**Post date:** [October 29, 2024, 11:18pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/5 "2024-10-29T23:18:55Z")

</div>

Thanks @jacob.small

I have attached both files for reference.

---

<div class="post-metadata">

**Author:** ![Khush.P](https://avatars.discourse-cdn.com/v4/letter/k/85e7bf/32.png) [@Khush.P](https://forum.dynamobim.com/u/Khush.P)\
**Post date:** [October 31, 2024, 12:36am UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/6 "2024-10-31T00:36:03Z")

</div>

[Room Name to Area Name.dyn](https://forum.dynamobim.com/uploads/short-url/8aNCrzOCtMs7YXCIS5zQrsol5LQ.dyn) (20.9 KB)  
@jacob.small I tested this script, it gives the Room names to Area Names but not at correct locations. The names fall in randomly, they don’t match.

Can you please help me with it of what i am doing wrong here?

---

<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:** [October 31, 2024, 1:04am UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/7 "2024-10-31T01:04:15Z")

</div>

Hey - sorry for not replying earlier. I’m traveling this week and as such only have a phone for stuff like this until Monday. If I get enough service in my travel I can try to have a look, but it might be a bit.

One thing to check is that the areas and rooms are all placed, and that some type of relationship (geometric or otherwise) is being built up.

---

<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:** [November 4, 2024, 12:26pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/8 "2024-11-04T12:26:56Z")

</div>

Went to dig into this today and found that we don’t have a Revit file. As such:

- We can only guess if this is for Revit 2022, 2023, 2024, or 2025
- We can only assume you’ve got all areas perfectly aligned to rooms
- We can only assume that everything is on the same phase and there is no existing conditions phase
- We can only assume you’ve got only a single area
- We can only assume that everything is on the same level

All of that said, the issue is that you don’t have any form of spatial alignment - that is you don’t have a means for associating the area to a room, or the room to an area. As such when you use AllElementsOfCategory you’re getting the rooms in their order of creation, then the areas in their order of creation, and so the Oldest area gets the value from the Oldest room, even though the oldest area might have been made in a completely different location. You can see how this plays out in the model screenshot below. I first changed the room name to include the Element Id so that we can look over the order of selection using the “OfCategory” method, and then I moved the Number parameter from the room to the area using the order of selection as you had. Finally I displayed both the room and area tags in the same view.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/8/181496e5267cdc9a175f153f45fd222cce80e21a.png)

This is the Dynamo graph to move stuff over - as seen above it’s not of much use.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/2/42e602486320d51f1072be3641d50de9170ed913.png)

What needs to happen is first a geometric relationship between the rooms and areas needs to be created. For this you can use Python, some custom nodes, or the “Room.IsInsideRoom” node. If there is a LOT of rooms or areas this might be ineffective due to the number of tests, but generally it works to a reasonable scale.

Here’s an example implementation:

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

WIth that group added in suddenly the results look much better:

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

Note that there are a BUNCH of added filters you’ll need to take into account, including but not limited to:

- Unplaced or unbound areas and rooms
- Area schemes
- Areas placed in room A but covering rooms A, B, and C
- Areas placed where there is no room (site stuff!)
- Areas and rooms in different files
- Areas at differing levels
- Phasing (you can never have NO phasing - avoiding it is usually an over simplification)

Depending on how complex you may want to look into other geometric relationships, such as building a solid for the areas and intersecting them with the room solids after applying some filters.

---

<div class="post-metadata">

**Author:** ![lgongoraFQVYK](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lgongoraFQVYK](https://forum.dynamobim.com/u/lgongoraFQVYK)\
**Post date:** [June 4, 2025, 8:35pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/10 "2025-06-04T20:35:01Z")

</div>

@jacob.small This is awesome, thank you for sharing! Is there anything I could add to filter out a particular Area Type (i.e. only Rentable and not any of the Gross Building areas that intersect the same room)?

---

<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:** [June 4, 2025, 8:39pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/11 "2025-06-04T20:39:34Z")

</div>

Yes - likely something like this will work: `All Elements of Category` \> `Element.GetParameterValue` \> `!=` \> `List.FilterByBoolMask` with the != result as the bool and the all elements of category as the list.

---

<div class="post-metadata">

**Author:** ![lgongoraFQVYK](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lgongoraFQVYK](https://forum.dynamobim.com/u/lgongoraFQVYK)\
**Post date:** [June 4, 2025, 9:10pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/12 "2025-06-04T21:10:25Z")

</div>

@jacob.small I’m trying to get the areas called “FOYER” from the Rentable scheme into the Room Schedule, but I keep getting random areas from the Gross Building scheme that intersect the same rooms.

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

This is how the script looks now but I’m probably not following your instructions above correctly:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/e/2e245eee50ce374092a1daa2976cf6cfc543eb2a.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:** [June 4, 2025, 9:49pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/13 "2025-06-04T21:49:41Z")

</div>

Your areas are being used in other nodes besides the filter. Those nodes need to connect to the List.FilterByBoolMask node.

---

<div class="post-metadata">

**Author:** ![lgongoraFQVYK](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lgongoraFQVYK](https://forum.dynamobim.com/u/lgongoraFQVYK)\
**Post date:** [June 5, 2025, 2:25pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/14 "2025-06-05T14:25:28Z")

</div>

@jacob.small I tried connecting all nodes coming from Areas to the List.Filter node but something would get disconnected instead.  
My apologies, I’m really not a Dynamo expert, I even tried the 2 options given in this forum (link below) and same result, areas from the Gross Building Scheme get pulled in instead of Rentable, and I haven’t even gotten to the part of filtering the Area specifically called “foyer” ☹

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

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

[https://www.revitforum.org/forum/revit-all-flavors/dynamo-bim/39948-filtering-areas-by-their-type-properties-not-working](https://www.revitforum.org/forum/revit-all-flavors/dynamo-bim/39948-filtering-areas-by-their-type-properties-not-working)

---

<div class="post-metadata">

**Author:** ![lgongoraFQVYK](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lgongoraFQVYK](https://forum.dynamobim.com/u/lgongoraFQVYK)\
**Post date:** [June 5, 2025, 2:55pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/15 "2025-06-05T14:55:47Z")

</div>

@jacob.small I also tried this to combine everything but still no luck 😭

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/a/9a65a898374f81ffe2e8b8c02a05dff6a43302b8.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:** [June 5, 2025, 3:08pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/16 "2025-06-05T15:08:54Z")

</div>

From the second option, what results do you get with the GetParameterValueByname with “Area Scheme Id” as the name?

---

<div class="post-metadata">

**Author:** ![lgongoraFQVYK](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lgongoraFQVYK](https://forum.dynamobim.com/u/lgongoraFQVYK)\
**Post date:** [June 5, 2025, 3:32pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/17 "2025-06-05T15:32:53Z")

</div>

@jacob.small It shows as Empty list at the end and error after Element Name:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/2/f27fb585f8754b28c77214dfd3a367d4846ae61b.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:** [June 5, 2025, 3:44pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/18 "2025-06-05T15:44:58Z")

</div>

What do you see from this node:

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

---

<div class="post-metadata">

**Author:** ![lgongoraFQVYK](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lgongoraFQVYK](https://forum.dynamobim.com/u/lgongoraFQVYK)\
**Post date:** [June 5, 2025, 3:48pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/19 "2025-06-05T15:48:55Z")

</div>

@jacob.small

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

---

<div class="post-metadata">

**Author:** ![lgongoraFQVYK](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lgongoraFQVYK](https://forum.dynamobim.com/u/lgongoraFQVYK)\
**Post date:** [June 5, 2025, 3:58pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/20 "2025-06-05T15:58:51Z")

</div>

@jacob.small if I replace Element.Name node with Object Type and remove the ElementType node, the error disappears, but the areas are still being pulled from Gross Building

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/7/a71f2f9628a9d94bfa67052f6a0acaa1caa55089.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:** [June 5, 2025, 5:14pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/21 "2025-06-05T17:14:11Z")

</div>

Try `areaType.Name;` in a code block right after the GetParameterValueByName node.

---

<div class="post-metadata">

**Author:** ![lgongoraFQVYK](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lgongoraFQVYK](https://forum.dynamobim.com/u/lgongoraFQVYK)\
**Post date:** [June 5, 2025, 5:22pm UTC](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497/22 "2025-06-05T17:22:58Z")

</div>

@jacob.small do I place it instead of Element.Name or Object.Type?

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

[Next page](https://forum.dynamobim.com/t/room-name-parameter-to-area-name-parameter/105497.md?page=2)
