#REVIT VIEW RANGE HOW TO#
Note: I have created an accompanying video that illustrates each of the steps below on Revit Wall Wrapping and how to close wall wraps at Openings and Ends. So, now that we have the framework for understanding Revit Material Layer Wrapping, lets go through a working example form start to finish to learn the process and identify nuances to the procedures where possible. In the absence of these parameters, Revit will default the returning material layers to the wall centreline.
#REVIT VIEW RANGE WINDOWS#
Layer Wrapping for returns at insertion points (Doors, Windows etc) is dependent on the inserted families Wall Closer Parameters.Structure being the first priority, Finish 2 being the lowest priority. These are default values and tell Revit the order of priority which the program should try wrap the wall layers. Revit Layer Wrapping is also dependent on the Layer Function Priorities.Revit Layer Wrapping is dependent on the Wall Assembly correctly allocating the Wrapping Conditions to the Layers within the type properties editor.In Brief, here are the highlights of what you need to know about How Revit Wall Material Layer Wrapping Works. So, as ever, I went on the path of discovery to enlighten myself and others, leading to this tutorial on Revit Wall Wrapping and how to correctly wrap Revit Walls at Insertion points (Doors, Windows, Louvres, Opes etc) and Wall Ends. On exploring the topic I quickly recognised why he had not got around to fixing it – the solution wasn’t readily available for him to find. ViewRange.SetOffset(PlanViewPlane.BottomClipPlane, maxZ - level.Working through a fairly basic project by my office standards and came across a Material Layer Wrapping issue that one my colleagues had yet to resolve. ViewRange.SetOffset(PlanViewPlane.CutPlane, maxZ - level.Elevation) ViewRange.SetOffset(PlanViewPlane.TopClipPlane, maxZ - level.Elevation) Set all other offsets to to the difference between the top of the section box and // the elevation of the level
![revit view range revit view range](https://evolve-consultancy.com/wp-content/uploads/2020/12/evolve-guide-revit-viewdepths-01.png)
ViewRange.SetOffset(PlanViewPlane.ViewDepthPlane, minZ - level.Elevation) Set the view depth offset to the difference between the bottom of the section box and // the elevation of the level ViewRange.SetLevelId(PlanViewPlane.ViewDepthPlane, level.Id) ViewRange.SetLevelId(PlanViewPlane.BottomClipPlane, level.Id) ViewRange.SetLevelId(PlanViewPlane.CutPlane, level.Id) ViewRange.SetLevelId(PlanViewPlane.TopClipPlane, level.Id) Set all planes of the view range to use the plan view's level PlanViewRange viewRange = viewPlan.GetViewRange() Get the PlanViewRange object from the plan view and give the Z values for the bottom and top of the section box // Adding the converts the value to the model coordinate system double minZ = + bboxOriginZ
![revit view range revit view range](https://2.bp.blogspot.com/-Wm1m3pc6Lb4/W0Sb8-LP_wI/AAAAAAAAJSk/KBNKVvj4J04bN3qdKOAherjFIpCNJ3BiQCLcBGAs/s1600/01%2BSection%2B01.png)
Transform.Origin defines the origin of the bounding box's coordinate system in the model coordinate system // The Z value indicates the vertical offset of the bounding box's coordinate system double bboxOriginZ = The coordinates of the bounding box are defined relative to a coordinate system specific to the bounding box // When setting the view range offsets, the values will need to be relative to the model // This transform translates from coordinate system of the bounding box to the model coordinate system Get the BoundingBoxXYZ (a 3D rectangular box) that describes the shape of the Section Box TaskDialog.Show( "Error", "There is no 3D view named '" + viewPlan.Name + "'") View3d = (from v in new FilteredElementCollector(doc).OfClass( typeof(View3D)).Cast() where v.Name = viewPlan.Name select v).First() if there is no 3D view whose name equals viewPlan.Name, then First() will throw an exception Get the level that generates the plan view return ends the execution of the macro return TaskDialog.Show( "Error", "Active view must be a plan view.") Error handling in case the active view is not a plan view if (viewPlan = null) ViewPlan viewPlan = doc.ActiveView as ViewPlan Get the active view and cast it to a ViewPlan (the API's class for Plan View) Run the macro and the view range is updatedĭocument doc =.Change the top or bottom of the section box.The view on the left is the 3D view with Section Box.