# Expanding Room Boundaries

**URL:** <https://forum.dynamobim.com/t/expanding-room-boundaries/70855>\
**Category:** Revit\
**Tags:** python, dynamo\
**Created:** [November 29, 2021, 3:42pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855 "2021-11-29T15:42:30Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![YBMCarlos](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ybmcarlos/32/125321_2.png) [@YBMCarlos](https://forum.dynamobim.com/u/YBMCarlos)\
**Post date:** [November 29, 2021, 3:42pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/1 "2021-11-29T15:42:30Z")

</div>

Hello everyone,

I am currently trying to create a script that will let me select all room boundaries whether it be per certain levels or all levels. I’m sure this requires a python script but as of now I do not know any python. So if anyone can take the time out of their day to give me any suggestions, I’d really appreciate it! Thank you.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/9/d9b3d7651fb1a1609bc62c0006d43f9f2c61ed94.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:** [November 29, 2021, 4:00pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/2 "2021-11-29T16:00:03Z")

</div>

> [@YBMCarlos](#):
>
> I’m sure this requires a python script

No need.

- Room.Boundaries node from [Archi-Lab](https://forum.dynamobim.com/t/revit-2022-dynamo-2-10-package-not-showing-up-and-icons-missing/62933/7?) package will collect these for you.
- Then Group Curves (also [Archi-Lab](https://forum.dynamobim.com/t/revit-2022-dynamo-2-10-package-not-showing-up-and-icons-missing/62933/7?)) and build a polycurve from each sublist to account for an donuts in your rooms.
- Then build a surface of each curve loop, query the surface’s area, and multiply that by -1.
- Use the negative area value as the key and the polycurves as the list input for a List.GroupByKey node.
- Next up a List.Deconstruct with proper list levels and lacing to pull the largest areas out from the inner openings.
- Finally we offset the polycurves. The list of ‘first’ items from the deconstruct node will want to be offset by a positive value, while the inner openings will want a negative value.

Some curves will fail (ie: offering a circular with a radius of 6 by 8) but this will be functional for most uses.

---

<div class="post-metadata">

**Author:** ![YBMCarlos](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ybmcarlos/32/125321_2.png) [@YBMCarlos](https://forum.dynamobim.com/u/YBMCarlos)\
**Post date:** [November 29, 2021, 9:19pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/3 "2021-11-29T21:19:13Z")

</div>

Hey Jacob, thank you so much for the reply!

This is honestly all I could understand from your instructions, sorry about that.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/9/19a68fcba683ec6d15f387501e759fe728dde2f1.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:** [November 30, 2021, 5:52am UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/4 "2021-11-30T05:52:13Z")

</div>

Hi @YBMCarlos …here is a way…know my example is on a link, but should almost the same…

 ![Screenshot 2021-11-01 200911](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/8/98b052ef960ce203e6642a49e59c9a736e931fb9.jpeg)

---

<div class="post-metadata">

**Author:** ![YBMCarlos](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ybmcarlos/32/125321_2.png) [@YBMCarlos](https://forum.dynamobim.com/u/YBMCarlos)\
**Post date:** [December 1, 2021, 2:49pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/5 "2021-12-01T14:49:22Z")

</div>

Thank you! This did get me to make some progress, this is what I currently have:

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

but i don’t understand why it’s giving me weird boundaries in the model:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/3/335532d2994f4859c4098bc051459a1ec20c053f.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:** [December 1, 2021, 2:59pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/6 "2021-12-01T14:59:43Z")

</div>

Hello @YBMCarlos …think you need offset polycurve instead of offset curve…but could be other thing as well

 ![Screenshot 2021-11-01 200911](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/5/f5538b6195335a333d3e4c633324a568ab174e98.jpeg)

---

<div class="post-metadata">

**Author:** ![YBMCarlos](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ybmcarlos/32/125321_2.png) [@YBMCarlos](https://forum.dynamobim.com/u/YBMCarlos)\
**Post date:** [December 1, 2021, 3:38pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/7 "2021-12-01T15:38:04Z")

</div>

yes it looks like it might be something else because I am still getting the same problem:

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/7/d745cb732a7bd191ae70da3137ce7017becd48fc.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:** [December 1, 2021, 3:40pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/8 "2021-12-01T15:40:40Z")

</div>

Can you show your dynamo preview and what the nodes give ? do you have overlapping rooms ?

---

<div class="post-metadata">

**Author:** ![YBMCarlos](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ybmcarlos/32/125321_2.png) [@YBMCarlos](https://forum.dynamobim.com/u/YBMCarlos)\
**Post date:** [December 1, 2021, 3:51pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/9 "2021-12-01T15:51:22Z")

</div>

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

this is what i see, but i do not have any overlapping rooms

---

<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:** [December 1, 2021, 3:55pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/10 "2021-12-01T15:55:23Z")

</div>

sorry for this here…isnt becourse you see your offset surface perimeter curves ?

---

<div class="post-metadata">

**Author:** ![YBMCarlos](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ybmcarlos/32/125321_2.png) [@YBMCarlos](https://forum.dynamobim.com/u/YBMCarlos)\
**Post date:** [December 1, 2021, 4:24pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/11 "2021-12-01T16:24:47Z")

</div>

so what I want the script to is expand the room boundaries by, in this case, 4 inches in every direction. not sure if im doing that with this script

---

<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:** [December 1, 2021, 4:27pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/12 "2021-12-01T16:27:47Z")

</div>

then try it and see if it works;) thats my best guess

---

<div class="post-metadata">

**Author:** ![YBMCarlos](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ybmcarlos/32/125321_2.png) [@YBMCarlos](https://forum.dynamobim.com/u/YBMCarlos)\
**Post date:** [December 1, 2021, 4:37pm UTC](https://forum.dynamobim.com/t/expanding-room-boundaries/70855/13 "2021-12-01T16:37:19Z")

</div>

it doesn’t it looks like, but i will keep trying. thank you!

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