SortPoints Method


Order a set of ReferencePoints in the same way Revit does when creating a curve from points.

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

Syntax

C#
public static bool SortPoints(
	ReferencePointArray arr
)
Visual Basic
Public Shared Function SortPoints ( _
	arr As ReferencePointArray _
) As Boolean
Visual C++
public:
static bool SortPoints(
	ReferencePointArray^ arr
)

Parameters

arr
Type: Autodesk.Revit.DB ReferencePointArray
An array of ReferencePoints. The array is reordered if sortPoints returns true, and is unchanged if sortPoints returns false.

Return Value

False if the least-squares method is unable to find a solution; true otherwise.

Remarks

Finds a best-fit line to the points by the least squares method, and orders the points by their projection onto the line.

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 →