2027 Method
Changes 0
M

Wall.Create

Description:
Creates a new rectangular profile wall within the project using the default wall style.
public static Wall Create(
	Document document,
	Curve curve,
	ElementId levelId,
	bool structural
)
  • document
    The document in which the new wall is created.
  • curve
    A curve representing the base line of the wall.
  • levelId
    Id of the level on which the wall is to be placed.
  • Boolean
    structural
    If set, specifies that the wall is structural in nature.
Return Value Wall If successful a new wall object within the project.
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);
}