Creates a rectangular opening on a wall.

Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)

Syntax

C#
public Opening NewOpening(
	Wall wall,
	XYZ pntStart,
	XYZ pntEnd
)
Visual Basic
Public Function NewOpening ( _
	wall As Wall, _
	pntStart As XYZ, _
	pntEnd As XYZ _
) As Opening
Visual C++
public:
Opening^ NewOpening(
	Wall^ wall, 
	XYZ^ pntStart, 
	XYZ^ pntEnd
)

Parameters

wall
Type: Autodesk.Revit.DB..::..Wall
Host element of the opening.
pntStart
Type: Autodesk.Revit.DB..::..XYZ
One corner of the rectangle.
pntEnd
Type: Autodesk.Revit.DB..::..XYZ
The opposite corner of the rectangle.

Return Value

If successful, an Opening object is returned.

Remarks

Slanted stacked walls do not support rectangular openings.

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentExceptionThrown if the wall does not exist in the given document, or if the wall doesn't support rectangular openings.

See Also