Plane Class

Provides access to the geometry plane object.

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


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


The user can construct a plane object, get or set the vectors and origin through this class.


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));

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