GetSpaceAtPoint Method (XYZ, Phase)


Gets a space containing the point.

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

Syntax

C#
public Space GetSpaceAtPoint(
	XYZ point,
	Phase phase
)
Visual Basic
Public Function GetSpaceAtPoint ( _
	point As XYZ, _
	phase As Phase _
) As Space
Visual C++
public:
Space^ GetSpaceAtPoint(
	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 space exists.

Return Value

The space containing the point.

Remarks

If phase is a null reference ( Nothing in Visual Basic) , it will get the space of the last phase.The first one found will be returned. If there is no space containing the point, it returns a null reference ( Nothing in Visual Basic) .

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException Thrown when the point is a 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.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →