Plane Class


A Planar surface.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.1090.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

Copy C#
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());
}
Copy VB.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

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 →