Gets a room containing the point.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Syntax
C# |
---|
public Room GetRoomAtPoint( XYZ point, Phase phase ) |
Visual Basic |
---|
Public Function GetRoomAtPoint ( _ point As XYZ, _ phase As Phase _ ) As Room |
Visual C++ |
---|
public: Room^ GetRoomAtPoint( XYZ^ point, Phase^ phase ) |
Parameters
- point
- Type: Autodesk.Revit.DB..::..XYZ
Point to be checked.
- phase
- Type: Autodesk.Revit.DB..::..Phase
Phase in which the room exists.
Return Value
The room containing the point.
Remarks
If phase is nullNothingnullptra null reference (Nothing in Visual Basic), it will get the room of the last phase.The first one found will be returned. If there is no room containing the point, it returns nullNothingnullptra null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentNullException | Thrown when the point is nullNothingnullptra null reference (Nothing in Visual Basic). |
Autodesk.Revit.Exceptions..::..ArgumentException | Thrown when the coordinates of the point are not number or are Double::MaxValue or Double::MinValue. |