2024 Class
Changes 0
C

PlanViewRange

Description:
This class represents the view range of a plan view or a plan region. It records the element ids of the levels which a plane is relative to and the offset of each plane from that level.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.PlanViewRange
public class PlanViewRange : IDisposable
private ElementId GetViewRangeTopClipPlane(Document doc, View view)
{
    ElementId topClipPlane = ElementId.InvalidElementId;

    if (view is ViewPlan)
    {
        ViewPlan viewPlan = view as ViewPlan;
        PlanViewRange viewRange = viewPlan.GetViewRange();

        topClipPlane = viewRange.GetLevelId(PlanViewPlane.TopClipPlane);
        double dOffset = viewRange.GetOffset(PlanViewPlane.TopClipPlane);

        if (topClipPlane != ElementId.InvalidElementId)
        {
            Element levelAbove = doc.GetElement(topClipPlane);
            TaskDialog.Show(view.Name, "Top Clip Plane: " + levelAbove.Name + "\r\nTop Offset: " + dOffset + " ft");
        }
    }

    return topClipPlane;
}
Name Return Type Description
M Dispose() None Releases all resources used by the
M GetLevelId(PlanViewPlane) ElementId Get the element id of the level for a View Depth plane
M GetOffset(PlanViewPlane) Offset value Get the offset value associated with a View Depth plane
M SetLevelId(PlanViewPlane, ElementId) None Set the level for a View Depth plane
M SetOffset(PlanViewPlane, Double) None Set the offset value associated with a View Depth plane
Name Return Type Description
P Current ElementId View range for the current plane
P IsValidObject bool Specifies whether the .NET object represents a valid Revit entity.
P LevelAbove ElementId View range for the level above the specified plane
P LevelBelow ElementId View range for the level below the specified plane
P Unlimited ElementId View range is unlimited