WallCreate(Document, IListCurve, ElementId, ElementId, Boolean, XYZ) Method |
Creates a non rectangular profile wall within the project using the specified wall type and normal vector.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic static Wall Create(
Document document,
IList<Curve> profile,
ElementId wallTypeId,
ElementId levelId,
bool structural,
XYZ normal
)
Public Shared Function Create (
document As Document,
profile As IList(Of Curve),
wallTypeId As ElementId,
levelId As ElementId,
structural As Boolean,
normal As XYZ
) As Wall
public:
static Wall^ Create(
Document^ document,
IList<Curve^>^ profile,
ElementId^ wallTypeId,
ElementId^ levelId,
bool structural,
XYZ^ normal
)
static member Create :
document : Document *
profile : IList<Curve> *
wallTypeId : ElementId *
levelId : ElementId *
structural : bool *
normal : XYZ -> Wall Parameters
- document Document
-
The document in which the new wall is created.
- profile IListCurve
-
An array of planar curves that represent the vertical profile of the wall.
- wallTypeId ElementId
-
Id of the wall type to be used by the new wall instead of the default type.
- levelId ElementId
-
Id of the level on which the wall is to be placed.
- structural Boolean
-
If set, specifies that the wall is structural in nature.
- normal XYZ
-
A vector that must be perpendicular to the profile which dictates which side of the wall is considered to be inside and outside.
Return Value
Wall
If successful a new wall object within the project.
Exceptions
Examplepublic Wall CreateWallUsingProfile(Autodesk.Revit.DB.Document document, Level level, WallType wallType)
{
XYZ first = new XYZ(0, 0, 0);
XYZ second = new XYZ(20, 0, 0);
XYZ third = new XYZ(20, 0, 15);
XYZ fourth = new XYZ(0, 0, 15);
IList<Curve> profile = new List<Curve>();
Autodesk.Revit.Creation.Application appCreation = document.Application.Create;
profile.Add(Line.CreateBound(first, second));
profile.Add(Line.CreateBound(second, third));
profile.Add(Line.CreateBound(third, fourth));
profile.Add(Line.CreateBound(fourth, first));
XYZ normal = new XYZ(0, 1, 0);
return Wall.Create(document, profile, wallType.Id, level.Id, true, normal);
}
See Also