# Wall foundations according to lines

**URL:** <https://forum.dynamobim.com/t/wall-foundations-according-to-lines/20090>\
**Category:** Uncategorized\
**Tags:** revit, clockwork, dynamo\
**Created:** [March 15, 2018, 2:15pm UTC](https://forum.dynamobim.com/t/wall-foundations-according-to-lines/20090 "2018-03-15T14:15:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![imbert](https://avatars.discourse-cdn.com/v4/letter/i/ea666f/32.png) [@imbert](https://forum.dynamobim.com/u/imbert)\
**Post date:** [March 15, 2018, 2:15pm UTC](https://forum.dynamobim.com/t/wall-foundations-according-to-lines/20090/1 "2018-03-15T14:15:56Z")

</div>

Hello everyone !

I’m trying to create wall foundations with dynamo, in the same script which create walls.  
The problem is that I can’t choose any kind of wall foundations in dynamo with “Family Types”…

My script :

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

Any idea ?  
Thanks !

---

<div class="post-metadata">

**Author:** ![Einar\_Raknes](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/einar_raknes/32/8566_2.png) [@Einar\_Raknes](https://forum.dynamobim.com/u/Einar_Raknes)\
**Post date:** [March 15, 2018, 5:45pm UTC](https://forum.dynamobim.com/t/wall-foundations-according-to-lines/20090/2 "2018-03-15T17:45:58Z")

</div>

A wall foundation is a System Family which is completely dependent of it’s wall. If you can’t find any nodes for it, you’ll have to use a python script with the [WallFoundation.Create](http://www.revitapidocs.com/2018/d5c7ab19-d10f-36e9-6aa2-581a28a55cb5.htm) method. Here is a completely untested mockup to get you started:

```
import clr

# Import List ( ICollection(ElementId) = List[ElementId]() )
clr.AddReference('System')
from System.Collections.Generic import List

# Import Revit API
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *

clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *

# Import ToDSType(bool) extension method
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

# Import DocumentManager and TransactionManager
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument

# Input
wall = UnwrapElement(IN[0])
wallFoundationType = UnwrapElement(IN[1])

 #Make changes to Revit DB in a Transaction
TransactionManager.Instance.EnsureInTransaction(doc)
WallFoundation.Create(doc, wallFoundationType.Id, wall.Id)
TransactionManager.Instance.TransactionTaskDone()

OUT = 0
```

---

<div class="post-metadata">

**Author:** ![imbert](https://avatars.discourse-cdn.com/v4/letter/i/ea666f/32.png) [@imbert](https://forum.dynamobim.com/u/imbert)\
**Post date:** [March 16, 2018, 7:17am UTC](https://forum.dynamobim.com/t/wall-foundations-according-to-lines/20090/3 "2018-03-16T07:17:48Z")

</div>

Thanks for your answer !  
I’m a beginner with the API and I don’t understand how to load the foundation’s family as you said. I’m have wall foundations already loaded in my project.  
Do you have any example ?

Thanks,

---

<div class="post-metadata">

**Author:** ![danco111](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@danco111](https://forum.dynamobim.com/u/danco111)\
**Post date:** [February 9, 2024, 7:26am UTC](https://forum.dynamobim.com/t/wall-foundations-according-to-lines/20090/4 "2024-02-09T07:26:12Z")

</div>

Pudiste solucionar ?

### EDIT MODERATION : TRANSLATION

Were you able to solve ?

---

<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:** [February 9, 2024, 7:57am UTC](https://forum.dynamobim.com/t/wall-foundations-according-to-lines/20090/5 "2024-02-09T07:57:07Z")

</div>

Hi @danco111 please use english, please translate your post…but this post here is 6 years old so better create a new and share all your material so far…thanks
