Constructs a Plane object from a normal and an origin represented as XYZ objects. Follows the standard conventions for a planar surface. The constructed Plane object will pass through origin and be perpendicular to normal. The X and Y axes of the plane will be defined arbitrarily.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2017
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- normal
- Type: Autodesk.Revit.DBXYZ
Plane normal. Expected to be a valid non-zero length vector. Doesn't need to be a unit vector.
- origin
- Type: Autodesk.Revit.DBXYZ
Plane origin. Expected to lie within the Revit design limits IsWithinLengthLimits(XYZ).
Remarks
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.
Examples

// Create a geometry plane in Revit application
XYZ normal = XYZ.BasisZ; // use basis of the z-axis (0,0,1) for normal vector
XYZ origin = XYZ.Zero; // origin is (0,0,0)
Plane geomPlane = Plane.CreateByNormalAndOrigin(normal, origin);

' Create a geometry plane in Revit application
Dim normal As XYZ = XYZ.BasisZ
' use basis of the z-axis (0,0,1) for normal vector
Dim origin As XYZ = XYZ.Zero
' origin is (0,0,0)
Dim geomPlane As Plane = Plane.CreateByNormalAndOrigin(normal, origin)
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | The input point lies outside of Revit design limits. |
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
Autodesk.Revit.ExceptionsArgumentOutOfRangeException | normal has zero length. |