Querying Openings

In Revit API, Openings of all types are represented by the DB.Opening. The Opening+ v1.6 primitive in Rhino.Inside.Revit represents Openings.

To collect ALL openings of a certain type, you can use Query Elements component with a Category Filter and select Rectangular Straight Wall Opening or Rectangular Arc Wall Opening (there are two categories since the geometry is calculated differerntly for straight vs arc walls) and Shaft Openings in Built-In Categories :

But more often than not, we would like to find the openings that are created on certain Revit elements we are interested in. We can use Host Inserts component to find the openings that are Hosted by a Revit element:

Note that Shaft Openings are not specifically placed on a Revit host. They are vertical elements that are bounded by two Levels and cut throught any Floor, Ceiling, or Roof elements in between. Using the Host Inserts component does not return any Shaft Openings for this reason:

Analyzing Openings

You can use the Inspect Element component to inspect class-level properties of an opening. This examples shows the properties on a Rectangular Wall Opening instance:

You can also use the Opening Boundary Profile+ v1.6 component to extract the boundary profile for a given opening:

Use the Element Host component to determine the element that is hosting the specific opening instance (e.g. Wall that has a sepcific opening)

Currently dormers are not very well covered in Revit API. As you can see there are no properties other than Phases when inspecting a dormer:

The dormer opening profile however can still be extracted by the Opening Boundary Profile+ v1.6 component:

Elements Cut by Shaft Opening

As mentioned before, Shaft Openings are not hosted on any specific Revit element. To determine elements (Floors in this example) that are cut by a shaft opening, we can use the BoundingBox Filter and filter for elements that are colliding with the shaft bounding box. The Opening+ v1.6 contains the shaft opening we are interested in:

Element Cut Profile

To extract the boundary profile of a host element (Floors in this example), use the Host Faces component and extract the Brep of the top or bottom face. Deconstructing this brep will also give you the curves:

Creating Wall Openings

To create a wall opening, just like when creating a wall opening in Revit UI, you would need two points on the wall surface. These points represent the min and max points of the rectangular cut. Add Wall Opening+ v1.6 component takes the input wall and points and creates an opening element as a result:

Creating Shafts

To create a shaft, use the Add Shaft Opening+ v1.6 component. Use the Levels Picker to select the top and bottom bounding levels, and pass the shaft boundary curve as input as well:

You can also use Level Constraint component to construct a more specific level constraint with offset values as well and pass to the Base and Top inputs:

Creating Vertical Openings

To create a vertical opening on a Roof, Ceiling, or Floor (Currently only non-sloped floors are supported by Revit API) use the Add Vertical Opening+ v1.7 component and pass the host element and boundary to it:

Notice that only non-sloped floors are currently supported by Revit API so no openings are created if the host floor has any slopes: