Plane Class


A Planar surface.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2016

Syntax

C#
public class Plane : Surface
Visual Basic
Public Class Plane _
	Inherits Surface
Visual C++
public ref class Plane : public Surface

Remarks

The parametric equation of the plane is S(u, v) = origin + u*xVec + v*yVec.

Examples

CopyC#
public void GetPlaneInfo(Plane plane)
{
    XYZ origin = plane.Origin;
    XYZ normal = plane.Normal;
    XYZ xVec = plane.XVec;
    XYZ yVec = plane.YVec;

    StringBuilder info = new StringBuilder();
    info.AppendLine("Plane Data:");
    info.AppendLine(string.Format("     Origin: ({0},{1},{2})", origin.X, origin.Y, origin.Z));
    info.AppendLine(string.Format("     Normal: ({0},{1},{2})", normal.X, normal.Y, normal.Z));
    info.AppendLine(string.Format("     XVec: ({0},{1},{2})", xVec.X, xVec.Y, xVec.Z));
    info.AppendLine(string.Format("     YVec: ({0},{1},{2})", yVec.X, yVec.Y, yVec.Z));

    TaskDialog.Show("Revit",info.ToString());
}
CopyVB.NET
Public Sub GetPlaneInfo(plane As Plane)
    Dim origin As XYZ = plane.Origin
    Dim normal As XYZ = plane.Normal
    Dim xVec As XYZ = plane.XVec
    Dim yVec As XYZ = plane.YVec

    Dim info As New StringBuilder()
    info.AppendLine("Plane Data:")
    info.AppendLine(String.Format("     Origin: ({0},{1},{2})", origin.X, origin.Y, origin.Z))
    info.AppendLine(String.Format("     Normal: ({0},{1},{2})", normal.X, normal.Y, normal.Z))
    info.AppendLine(String.Format("     XVec: ({0},{1},{2})", xVec.X, xVec.Y, xVec.Z))
    info.AppendLine(String.Format("     YVec: ({0},{1},{2})", yVec.X, yVec.Y, yVec.Z))

    TaskDialog.Show("Revit", info.ToString())
End Sub

Inheritance Hierarchy

SystemObject
  Autodesk.Revit.DBSurface
    Autodesk.Revit.DBPlane

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 →