Revit 2023 API |
Document..::..NewOpening Method (Wall, XYZ, XYZ) |
Document Class See Also |
Creates a rectangular opening on a wall.
Namespace: Autodesk.Revit.Creation
Assembly: RevitAPI (in RevitAPI.dll) Version: 23.0.0.0 (23.1.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.
Remarks
Slanted stacked walls do not support rectangular openings.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | Thrown if the wall does not exist in the given document, or if the wall doesn't support rectangular openings. |