NewOpening Method (Wall, XYZ, XYZ)


Creates a rectangular opening on a wall.

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

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.DBWall
Host element of the opening.
pntStart
Type: Autodesk.Revit.DBXYZ
One corner of the rectangle.
pntEnd
Type: Autodesk.Revit.DBXYZ
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.ExceptionsArgumentExceptionThrown if the wall does not exist in the given document, or if the wall doesn't support rectangular openings.

See Also