Project Method


Project a 3D point orthogonally onto a surface (to find the nearest point). Throws InvalidOperationException if the projection fails.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2018.1

Syntax

C#
public void Project(
	XYZ point,
	out UV uv,
	out double distance
)
Visual Basic
Public Sub Project ( _
	point As XYZ, _
	<OutAttribute> ByRef uv As UV, _
	<OutAttribute> ByRef distance As Double _
)
Visual C++
public:
void Project(
	XYZ^ point, 
	[OutAttribute] UV^% uv, 
	[OutAttribute] double% distance
)

Parameters

point
Type: Autodesk.Revit.DBXYZ
The point to project.
uv
Type: Autodesk.Revit.DBUV%
The surface coordinates of the projected point.
distance
Type: SystemDouble%
Holds the distance from input point to its projection.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException The projection failed.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →