ProjectWithGuessPoint Method


Project a 3D point orthogonally onto a surface (to find the nearest point). This method is meant to be used when a good approximate solution for the projection is available. Throws InvalidOperationException if the projection fails.

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

Syntax

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

Parameters

point
Type: Autodesk.Revit.DB XYZ
The point to project.
guessUV
Type: Autodesk.Revit.DB UV
The calculation will look for a project near the provided UV.
uv
Type: Autodesk.Revit.DB UV %
The surface coordinates of the projected point.
distance
Type: System Double %
Holds the distance from input point to its projection.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions InvalidOperationException 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 →