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