XYZ.DistanceTo Method

XYZDistanceTo Method

Returns the distance from this point to the specified point.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.3.0.0 (25.3.0.0)
Syntax
public double DistanceTo(
	XYZ source
)
Public Function DistanceTo ( 
	source As XYZ
) As Double
public:
double DistanceTo(
	XYZ^ source
)
member DistanceTo : 
        source : XYZ -> float 

Parameters

source  XYZ
The specified point.

Return Value

Double
The real number equal to the distance between the two points.
Exceptions
ExceptionCondition
ArgumentNullException Thrown when source is .
Remarks
The distance between the two points is equal to the length of the vector that joins the two points.
See Also