# Creating a filled region at the location of a selected wall

**URL:** <https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [July 26, 2023, 9:27am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201 "2023-07-26T09:27:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![farshidkaviani](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@farshidkaviani](https://forum.dynamobim.com/u/farshidkaviani)\
**Post date:** [July 26, 2023, 9:27am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/1 "2023-07-26T09:27:56Z")

</div>

Greetings,  
I am trying to create a filled region over a selected wall at the location a selected wall by finding the top surface of the wall and pulling it over XY Plane, then translating the boundary lines to the elevation of the current View Range Cut Plane to used use them as boundaries of the filled region without luck!

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/c/9c61d89f3a55ee43b1f3a04ce9ec974d819f1d26.png)  
[Filled Region-3.dyn](https://forum.dynamobim.com/uploads/short-url/lF7VYrVO0czqahVzeQqDL6nobcK.dyn) (50.5 KB)

I do appreciate it if you could help me to solve the problem.

Regards,  
Farshid

---

<div class="post-metadata">

**Author:** ![Draxl\_Andreas](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/draxl_andreas/32/145744_2.png) [@Draxl\_Andreas](https://forum.dynamobim.com/u/Draxl_Andreas)\
**Post date:** [July 26, 2023, 10:22am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/2 "2023-07-26T10:22:59Z")

</div>

@farshidkaviani ,

i would recommand using a detail-component!

 ![grafik](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/b/8b32d6b430d3b8c699d8328d08ac11712b4c7904.png)

placing it in the corresponing view…

 ![grafik](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/5/b5718608334bbf6f540a44937fedc4a976ac6113.png)

here a 3D variation with generic modell…

 ![grafik](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/b/7bba1d815a8377603f8173e902042a90aecb045f.png)

 ![2023-07-26_12h40_59](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/2/12dcc6c1edf99eb68ab18fd68bac1e75eecccfb5.png)

KR

Andreas

---

<div class="post-metadata">

**Author:** ![farshidkaviani](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@farshidkaviani](https://forum.dynamobim.com/u/farshidkaviani)\
**Post date:** [July 27, 2023, 10:11am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/3 "2023-07-27T10:11:15Z")

</div>

Hi @Draxl_Andreas,  
Thank you for your input, but I am not sure if I understood you completely. I used the main idea of getting the location line then I found the wall width and created 2 new lines by offsetting the curve on the sides of the location line, finally I made 2 other lines using the Start end End points of the lines created in the previous step.  
Unfortunately, this approach did result any better and I still get errors at the end.

Regards,  
Farshid

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/f/af0377cd7e20b49868b6f2ad7b2b5796e8ce1568.png)  
[Filled Region-4.dyn](https://forum.dynamobim.com/uploads/short-url/dy20bxAmwmJ12h6qKpKrOfSVzwQ.dyn) (60.3 KB)

---

<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:** [July 27, 2023, 10:15am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/4 "2023-07-27T10:15:03Z")

</div>

Hi @farshidkaviani you will need pull your curves on plane, filled region is a detail items and dont have any elevation

---

<div class="post-metadata">

**Author:** ![farshidkaviani](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@farshidkaviani](https://forum.dynamobim.com/u/farshidkaviani)\
**Post date:** [July 27, 2023, 10:43am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/5 "2023-07-27T10:43:11Z")

</div>

Hi @sovitek,  
Thank you for your input. I did try to pull the curves onto XY Plane but still I get an error.  
[Filled Region-5.dyn](https://forum.dynamobim.com/uploads/short-url/f55oFgKNI3IYe996esLxxSsUVwC.dyn) (63.2 KB)

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

Regards,  
Farshid

---

<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:** [July 27, 2023, 10:44am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/6 "2023-07-27T10:44:14Z")

</div>

arhh ok…not 100 sure what want to do…but could something here help…  
 ![Revit_aCy8hCSsEL](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/d/ed0a522a01d525a84590647657233748ff26971a.gif)

Ps seems you use some viewrange for your curves ? it should doesnt matter as the detail items is view specific …i think

---

<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:** [July 27, 2023, 10:53am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/7 "2023-07-27T10:53:10Z")

</div>

I think that the end point of line 1 must be the start point of line 2, the end point of line 2 the start point of line 3, etc.

The quick fix: make a polycurve of the curve loops (Polycurve.ByjoinedCurves), and then explode it.

---

<div class="post-metadata">

**Author:** ![farshidkaviani](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@farshidkaviani](https://forum.dynamobim.com/u/farshidkaviani)\
**Post date:** [July 27, 2023, 11:07am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/8 "2023-07-27T11:07:14Z")

</div>

@sovitek  
Thanks again for your input, but it seems your approach does not work on the walls attached to a pitched roof which is my case.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/e/4e88f53fba0bc8f6b28e31c744963a6fd85836ef.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:** [July 27, 2023, 11:09am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/9 "2023-07-27T11:09:36Z")

</div>

Hello  
if your wall is only variable in height  
is it also variable in level?

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

cordially  
christian.stan

---

<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:** [July 27, 2023, 11:10am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/10 "2023-07-27T11:10:32Z")

</div>

try with a == -1 in the codeblock

---

<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:** [July 27, 2023, 11:18am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/11 "2023-07-27T11:18:01Z")

</div>

Hello  
a\>0 to get the upper faces for the z component of the vector?

cordially  
christian.stan

---

<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:** [July 27, 2023, 11:19am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/12 "2023-07-27T11:19:23Z")

</div>

Yes Christian…but then i think user need pull on plane 😉

@farshidkaviani in your image you have another issue as well…

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

---

<div class="post-metadata">

**Author:** ![farshidkaviani](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@farshidkaviani](https://forum.dynamobim.com/u/farshidkaviani)\
**Post date:** [July 27, 2023, 11:26am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/13 "2023-07-27T11:26:04Z")

</div>

Hi @jacob.small ,  
Thanks for your input. I tried your approach, but it seems that it does not work in my case. I do appreciate it if you could take a look at the attached script and try it with a wall attached to a pitched roof.  
[Filled Region-7.dyn](https://forum.dynamobim.com/uploads/short-url/qN90H1dIZf0giC2an3bPdeFgloU.dyn) (71.6 KB)

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

Regards,  
Farshid

---

<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:** [July 27, 2023, 11:27am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/14 "2023-07-27T11:27:23Z")

</div>

your are right pull on plane 😉

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/1/e17066dbe0a279a4dd64fcdab583d710355c9961.png)  
cordially  
christian.stan

---

<div class="post-metadata">

**Author:** ![farshidkaviani](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@farshidkaviani](https://forum.dynamobim.com/u/farshidkaviani)\
**Post date:** [July 27, 2023, 11:40am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/15 "2023-07-27T11:40:16Z")

</div>

@sovitek ,  
Thank you so much. It was my bad. The only modification I made in your script was adding an OR node to make it usable for walls with both flat and sloped top surfaces.

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

I do appreciate your time and help.

Regards,  
Farshid

---

<div class="post-metadata">

**Author:** ![farshidkaviani](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@farshidkaviani](https://forum.dynamobim.com/u/farshidkaviani)\
**Post date:** [July 27, 2023, 11:43am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/16 "2023-07-27T11:43:10Z")

</div>

Hi @christian.stan,  
Thank you for your input. Your approach combined with @sovitek comment seems to be functional as well.

Regards,  
Farshid

---

<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:** [July 27, 2023, 11:51am UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/17 "2023-07-27T11:51:45Z")

</div>

You solution will not work on topsurface, then you will need to round the vector and pull on plane…

 ![Capture.PNG](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/6/76a01e63dd9aed55b71ef9bfe99bdccd18f9de2c.jpeg)

---

<div class="post-metadata">

**Author:** ![farshidkaviani](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@farshidkaviani](https://forum.dynamobim.com/u/farshidkaviani)\
**Post date:** [July 27, 2023, 12:03pm UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/18 "2023-07-27T12:03:47Z")

</div>

@sovitek ,  
You are probably right, but since I only need the bottom surface to create the filled region over a selected wall in the plan views, then it seems my approach also works both for sloped and flat top surfaces of the wall.

---

<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:** [July 27, 2023, 12:05pm UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/19 "2023-07-27T12:05:16Z")

</div>

happy it could work 😉

---

<div class="post-metadata">

**Author:** ![serenitynow](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@serenitynow](https://forum.dynamobim.com/u/serenitynow)\
**Post date:** [January 25, 2024, 12:02pm UTC](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201/20 "2024-01-25T12:02:48Z")

</div>

Hi, I was working on something similar to this and this script is helping me understand in what direction I need to go.

I do have a question and was wondering if it’s possible. The way you made a filled region over an entire wall with multiple layers(finish, isolation, finish), is it possible to create multiple filled region for each layer of the wall?

thanks in advance.

[Next page](https://forum.dynamobim.com/t/creating-a-filled-region-at-the-location-of-a-selected-wall/92201.md?page=2)
