CreateByThreePoints Method


Creates a Plane object passing through three points supplied as arguments.

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

Syntax

C#
public static Plane CreateByThreePoints(
	XYZ point1,
	XYZ point2,
	XYZ point3
)
Visual Basic
Public Shared Function CreateByThreePoints ( _
	point1 As XYZ, _
	point2 As XYZ, _
	point3 As XYZ _
) As Plane
Visual C++
public:
static Plane^ CreateByThreePoints(
	XYZ^ point1, 
	XYZ^ point2, 
	XYZ^ point3
)

Parameters

point1
Type: Autodesk.Revit.DB XYZ
First of the three points that define a unique plane. The created Plane object will pass through these points.
point2
Type: Autodesk.Revit.DB XYZ
Second of the three points that define a unique plane.
point3
Type: Autodesk.Revit.DB XYZ
Third of the three points that define a unique plane.

Remarks

The points supplied as arguments must fully define a plane: they may not lie on a straight line or be too close to each other. The points must lie within the Revit design limits. This function does not guarantee a specific parameterization of the created Plane. Use Plane.Create(Frame) to enforce a specific parameterization of the created Plane object. All three points are expected to lie within the Revit design limits IsWithinLengthLimits(XYZ) .

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException The input point lies outside of Revit design limits.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null
Autodesk.Revit.Exceptions ArgumentsInconsistentException Throws if the input points do not define a unique plane. This is typically caused by points being too close to each other, or all three points being on or close to a straight 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 →