Creates a new rectangular profile wall within the project using the specified wall type, height, and offset.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Syntax
Visual Basic |
---|
Public Shared Function Create ( _
document As Document, _
curve As Curve, _
wallTypeId As ElementId, _
levelId As ElementId, _
height As Double, _
offset As Double, _
flip As Boolean, _
structural As Boolean _
) As Wall |
Parameters
- document
- Type: Autodesk.Revit.DB..::..Document
The document in which the new wall is created.
- curve
- Type: Autodesk.Revit.DB..::..Curve
A curve representing the base line of the wall.
- wallTypeId
- Type: Autodesk.Revit.DB..::..ElementId
Id of the wall type to be used by the new wall instead of the default type.
- levelId
- Type: Autodesk.Revit.DB..::..ElementId
Id of the level on which the wall is to be placed.
- height
- Type: System..::..Double
The height of the wall other than the default height.
- offset
- Type: System..::..Double
Modifies the wall's Base Offset parameter to determine its vertical placement.
- flip
- Type: System..::..Boolean
Change which side of the wall is considered to be the inside and outside of the wall.
- structural
- Type: System..::..Boolean
If set, specifies that the wall is structural in nature.
Return Value
If successful a new wall object within the project.
Examples
CopyC#
public Wall CreateWallUsingCurve2(Autodesk.Revit.DB.Document document, Level level, WallType wallType)
{
XYZ start = new XYZ(0, 0, 0);
XYZ end = new XYZ(10, 10, 0);
Line geomLine = Line.CreateBound(start, end);
double height = 15;
double offset = 3;
return Wall.Create(document, geomLine, wallType.Id, level.Id, height, offset, true, true);
}
CopyVB.NET
Public Function CreateWallUsingCurve2(document As Autodesk.Revit.DB.Document, level As Level, wallType As WallType) As Wall
Dim start As New XYZ(0, 0, 0)
Dim [end] As New XYZ(10, 10, 0)
Dim geomLine As Line = Line.CreateBound(start, [end])
Dim height As Double = 15
Dim offset As Double = 3
Return Wall.Create(document, geomLine, wallType.Id, level.Id, height, offset, _
True, True)
End Function
Exceptions
See Also