# Wall extend and short

**URL:** <https://forum.dynamobim.com/t/wall-extend-and-short/60682>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [February 19, 2021, 12:54pm UTC](https://forum.dynamobim.com/t/wall-extend-and-short/60682 "2021-02-19T12:54:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlandkroon](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@rlandkroon](https://forum.dynamobim.com/u/rlandkroon)\
**Post date:** [February 19, 2021, 12:54pm UTC](https://forum.dynamobim.com/t/wall-extend-and-short/60682/1 "2021-02-19T12:54:31Z")

</div>

Dear Dynamo Specialists,

I have a question. I have create a lot of walls.

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

Does anyone have an idea how to extend and short the walls?  
And automatic detect if the wall have to be extend of to be shorted?

Thx in advance!

---

<div class="post-metadata">

**Author:** ![simon\_murphy1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/simon_murphy1/32/101536_2.png) [@simon\_murphy1](https://forum.dynamobim.com/u/simon_murphy1)\
**Post date:** [February 19, 2021, 1:18pm UTC](https://forum.dynamobim.com/t/wall-extend-and-short/60682/2 "2021-02-19T13:18:45Z")

</div>

Not a simple task to automate. Might take as long to create the script as to do manually. But maybe I am being pessimistic and some else can solve. Edit 3: Probably is solvable you should definitely have a go

First use these nodes to get started  
Element.Types  
AllElementsofType  
Element.Location

Edit: Maybe intersect all location lines to create a new polyline. One step might be delete existing walls and create a new set of walls on the correct location lines. But maybe you don’t need delete maybe you can use SetparametervalueByName node to assign the correct curves to be the location parameter of the walls.

Edit 2:  
Get walls of type. Get location of these walls. Create corrected location curves for these walls using old location as guide. Then assign this new curve to be location for that wall.

---

<div class="post-metadata">

**Author:** ![rlandkroon](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@rlandkroon](https://forum.dynamobim.com/u/rlandkroon)\
**Post date:** [February 19, 2021, 1:40pm UTC](https://forum.dynamobim.com/t/wall-extend-and-short/60682/3 "2021-02-19T13:40:07Z")

</div>

Thanks!!!

---

<div class="post-metadata">

**Author:** ![simon\_murphy1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/simon_murphy1/32/101536_2.png) [@simon\_murphy1](https://forum.dynamobim.com/u/simon_murphy1)\
**Post date:** [February 19, 2021, 7:39pm UTC](https://forum.dynamobim.com/t/wall-extend-and-short/60682/4 "2021-02-19T19:39:40Z")

</div>

[correct walls - needs improving to work on more complex revit projects.dyn](https://forum.dynamobim.com/uploads/short-url/qi327uvb2b996sCBpp9F4FwydGS.dyn) (32.8 KB)

This file should get you started. You need to filter out other wall types and create groups of externl leafs of each building before you can do the latter part of the script. I made this work for a model with only one loop of walls. On a more complicated Revit project you would need change this script quite a bit. You should not try use this script on the live Revit project. Instead create a simple Revit project to test and build the more complex script you need.

 ![Change All Walls in the model - needs editing to work on complex models](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/7/87f4598d8e98bcf97290e4ea977c77246ee1cbc4.png)

Edit: This Dynamo script is made the Revit 2020 Dynamo version.

---

<div class="post-metadata">

**Author:** ![rlandkroon](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@rlandkroon](https://forum.dynamobim.com/u/rlandkroon)\
**Post date:** [February 22, 2021, 11:00am UTC](https://forum.dynamobim.com/t/wall-extend-and-short/60682/5 "2021-02-22T11:00:53Z")

</div>

Thanks! I get another way to solve the problem.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/e/5eaa5c1ae670cb8898e6afc0c29d2464683f03bf.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/f/1f375b5cb58e189955e8d80df179ac3a7824c404.png)

---

<div class="post-metadata">

**Author:** ![Gcf\_Design](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@Gcf\_Design](https://forum.dynamobim.com/u/Gcf_Design)\
**Post date:** [August 18, 2021, 9:33am UTC](https://forum.dynamobim.com/t/wall-extend-and-short/60682/6 "2021-08-18T09:33:54Z")

</div>

What is the hidden value? 1, -1?

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

---

<div class="post-metadata">

**Author:** ![Gcf\_Design](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@Gcf\_Design](https://forum.dynamobim.com/u/Gcf_Design)\
**Post date:** [August 18, 2021, 9:34am UTC](https://forum.dynamobim.com/t/wall-extend-and-short/60682/7 "2021-08-18T09:34:34Z")

</div>

Here’s my results at the moment.

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