ReferencePlane Class


Represents a reference plane of Autodesk Revit.

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

Syntax

C#
public class ReferencePlane : DatumPlane
Visual Basic
Public Class ReferencePlane _
	Inherits DatumPlane
Visual C++
public ref class ReferencePlane : public DatumPlane

Examples

Copy C#
private void Getinfo_ReferencePlane(ReferencePlane refPlane)
{
    string message = "Reference Plane: ";
    //get the bubble end of the reference plane
    XYZ bubbleEnd = refPlane.BubbleEnd;
    message += "\nBubble end: (" + bubbleEnd.X + ", "
                       + bubbleEnd.Y + ", " + bubbleEnd.Z + ")";

    //get the direction of the reference plane
    XYZ direction = refPlane.Direction;
    message += "\nDirection: (" + direction.X + ", "
                    + direction.Y + ", " + direction.Z + ")";

    //get the freeEnd of the reference plane
    XYZ freeEnd = refPlane.FreeEnd;
    message += "\nFree End: (" + freeEnd.X + ", "
                    + freeEnd.Y + ", " + freeEnd.Z + ")";

    //get the name of the reference plane
    message += "\nName: " + refPlane.Name;

    //get the normal vector of the reference plane
    XYZ normal = refPlane.Normal;
    message += "\nNormal vector: (" + normal.X + ", "
                    + normal.Y + ", " + normal.Z + ")";

    //get the geometry plane to which the reference plane assigned 
    Autodesk.Revit.DB.Plane plane = refPlane.GetPlane();
    message += "\norigin of the plane: (" + plane.Origin.X + ", "
                    + plane.Origin.Y + ", " + plane.Origin.Z + ")";

    message += "\nnormal of the plane: (" + plane.Normal.X + ", "
                    + plane.Normal.Y + ", " + plane.Normal.Z + ")";

    message += "\nXvec of the plane: (" + plane.XVec.X + ", "
                    + plane.XVec.Y + ", " + plane.XVec.Z + ")";

    message += "\nYvec of the plane: (" + plane.YVec.X + ", "
                    + plane.YVec.Y + ", " + plane.YVec.Z + ")";

    TaskDialog.Show("Revit",message);
}
Copy VB.NET
Private Sub Getinfo_ReferencePlane(refPlane As ReferencePlane)
    Dim message As String = "Reference Plane: "
    'get the bubble end of the reference plane
    Dim bubbleEnd As XYZ = refPlane.BubbleEnd
    message += ((vbLf & "Bubble end: (" + bubbleEnd.X & ", ") + bubbleEnd.Y & ", ") + bubbleEnd.Z & ")"

    'get the direction of the reference plane
    Dim direction As XYZ = refPlane.Direction
    message += ((vbLf & "Direction: (" + direction.X & ", ") + direction.Y & ", ") + direction.Z & ")"

    'get the freeEnd of the reference plane
    Dim freeEnd As XYZ = refPlane.FreeEnd
    message += ((vbLf & "Free End: (" + freeEnd.X & ", ") + freeEnd.Y & ", ") + freeEnd.Z & ")"

    'get the name of the reference plane
    message += vbLf & "Name: " & Convert.ToString(refPlane.Name)

    'get the normal vector of the reference plane
    Dim normal As XYZ = refPlane.Normal
    message += ((vbLf & "Normal vector: (" + normal.X & ", ") + normal.Y & ", ") + normal.Z & ")"

    'get the geometry plane to which the reference plane assigned 
 Dim plane As Autodesk.Revit.DB.Plane = refPlane.GetPlane()
    message += ((vbLf & "origin of the plane: (" + plane.Origin.X & ", ") + plane.Origin.Y & ", ") + plane.Origin.Z & ")"

    message += ((vbLf & "normal of the plane: (" + plane.Normal.X & ", ") + plane.Normal.Y & ", ") + plane.Normal.Z & ")"

    message += ((vbLf & "Xvec of the plane: (" + plane.XVec.X & ", ") + plane.XVec.Y & ", ") + plane.XVec.Z & ")"

    message += ((vbLf & "Yvec of the plane: (" + plane.YVec.X & ", ") + plane.YVec.Y & ", ") + plane.YVec.Z & ")"

    TaskDialog.Show("Revit", message)
End Sub

Inheritance Hierarchy

See Also