Revit 2026 API
Family |
Create an opening to cut the wall or ceiling.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public Opening NewOpening( Element host, CurveArray profile )
Public Function NewOpening ( host As Element, profile As CurveArray ) As Opening
public: Opening^ NewOpening( Element^ host, CurveArray^ profile )
member NewOpening : host : Element * profile : CurveArray -> Opening
Parameters
- host Element
- Host elements that new opening would lie in. The host can only be a wall or a ceiling.
- profile 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
OpeningIf successful, the newly created opening is returned, otherwise an exception with error information will be thrown.
| Exception | Condition |
|---|---|
| ArgumentNullException | Thrown when the input argument host or profile is . |
| ArgumentException | Thrown when host isn't a wall or a ceiling. Thrown when profile doesn't contain any loops. |
| InvalidOperationException | Thrown when opening creation failed. |
See Also