NewOpening Method


Create an opening to cut the wall or ceiling.

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

Syntax

C#
public Opening NewOpening(
	Element host,
	CurveArray profile
)
Visual Basic
Public Function NewOpening ( _
	host As Element, _
	profile As CurveArray _
) As Opening
Visual C++
public:
Opening^ NewOpening(
	Element^ host, 
	CurveArray^ profile
)

Parameters

host
Type: Autodesk.Revit.DB Element
Host elements that new opening would lie in. The host can only be a wall or a ceiling.
profile
Type: Autodesk.Revit.DB CurveArray
The profile of the newly created opening. This may contain more than one curve loop. Each loop must be a fully closed curve loop and the loops may not intersect. The profiles will be projected into the host plane.

Return Value

If successful, the newly created opening is returned, otherwise an exception with error information will be thrown.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException Thrown when the input argument host or profile is a null reference ( Nothing in Visual Basic) .
Autodesk.Revit.Exceptions ArgumentException Thrown when host isn't a wall or a ceiling. Thrown when profile doesn't contain any loops.
Autodesk.Revit.Exceptions InvalidOperationException Thrown when opening creation failed.

See Also