Create Method (Document, IList(Curve), ElementId, ElementId, Boolean)


Creates a non rectangular profile wall within the project using the specified wall type.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)

Syntax

C#
public static Wall Create(
	Document document,
	IList<Curve> profile,
	ElementId wallTypeId,
	ElementId levelId,
	bool structural
)
Visual Basic
Public Shared Function Create ( _
	document As Document, _
	profile As IList(Of Curve), _
	wallTypeId As ElementId, _
	levelId As ElementId, _
	structural As Boolean _
) As Wall
Visual C++
public:
static Wall^ Create(
	Document^ document, 
	IList<Curve^>^ profile, 
	ElementId^ wallTypeId, 
	ElementId^ levelId, 
	bool structural
)

Parameters

document
Type: Autodesk.Revit.DBDocument
The document in which the new wall is created.
profile
Type: System.Collections.GenericIListCurve
An array of planar curves that represent the vertical profile of the wall.
wallTypeId
Type: Autodesk.Revit.DBElementId
Id of the wall type to be used by the new wall instead of the default type.
levelId
Type: Autodesk.Revit.DBElementId
Id of the level on which the wall is to be placed.
structural
Type: SystemBoolean
If set, specifies that the wall is structural in nature.

Return Value

If successful a new wall object within the project.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The input profile contains at least one helical curve and is not supported for this operation.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException Failed to create the wall.
Autodesk.Revit.ExceptionsModificationForbiddenException The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process.
Autodesk.Revit.ExceptionsModificationOutsideTransactionException The document has no open transaction.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →