NewOpening Method (Wall, XYZ, XYZ)


Creates a rectangular opening on a wall.

Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 16.0.0.0 (16.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.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.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException Thrown if the wall does not exist in the given document.

See Also