Create Method


Creates a new wall foundation within the project.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2017

Syntax

C#
public static WallFoundation Create(
	Document document,
	ElementId typeId,
	ElementId wallId
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	typeId As ElementId, _
	wallId As ElementId _
) As WallFoundation
Visual C++
public:
static WallFoundation^ Create(
	Document^ document, 
	ElementId^ typeId, 
	ElementId^ wallId
)

Parameters

document
Type: Autodesk.Revit.DB Document
The document.
typeId
Type: Autodesk.Revit.DB ElementId
The id of the wall foundation type of the newly created wall foundation.
wallId
Type: Autodesk.Revit.DB ElementId
The id of the host wall of the newly created wall foundation.

Return Value

If successful, returns the newly created wall foundation, a null reference ( Nothing in Visual Basic) otherwise.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException typeId is not a valid WallFoundationType id. -or- wallId does not refer to a valid wall.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →