Wall.Create
Description:
Creates a new rectangular profile wall within the project using the default wall style.
Creates a new rectangular profile wall within the project using the default wall style.
Overloads (5):
-
documentThe document in which the new wall is created.
-
curveA curve representing the base line of the wall.
-
levelIdId of the level on which the wall is to be placed.
-
BooleanstructuralIf set, specifies that the wall is structural in nature.
public Wall CreateWallUsingCurve1(Autodesk.Revit.DB.Document document, Level level)
{
// Build a location line for the wall creation
XYZ start = new XYZ(0, 0, 0);
XYZ end = new XYZ(10, 10, 0);
Line geomLine = Line.CreateBound(start, end);
// Create a wall using the location line
return Wall.Create(document, geomLine, level.Id, true);
}
-
The curve argument is not valid for wall creation.
-
A non-optional argument was null
-
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.
-
The document has no open transaction.