Documenting Stairs with Dynamo

Documenting stairs

This tutorial explains the process of documenting stairs with Dynamo. Documentation is essential in not only describing to the contractor what to build but also as a verification process that it meets regulations. Typically for stairs, this process will involve creating a dedicated drawing series with detailed callout plans and sections. Although many stair elements are repeatable, the way that dimensions and tags are hosted to elements within Revit means that merely copying and pasting annotations isn’t always possible. The process, therefore, can become very time-consuming and typically engulfs a team member for many weeks.

To address this issue, Parametric Monkey has developed a Dynamo workflow to automate the stair documentation process. Five steps define the workflow – generating annotations for stairs both in plan and section by creating dimensions, number systems, spot elevations, stair run tags and minimum clearance zones. Each of those steps is described below.

Documenting stairs in Dynamo & API limitations

Much of the complexity of documenting stairs with Dynamo is a direct result of limitations with the Revit API and multistorey stairs. The API allows specific annotations such as number systems to be applied to multistory stairs. However, other annotations, such as stair run tags, must be applied to subelements, that is, stair runs. Collecting the subelement of a multistorey stair however only returns the ‘main’ stair element – ignoring all other instances. This limitation means many operations need to be performed geometrically rather than extracting the data from Revit.

The workflow described below, therefore works best on individual stairs, model groups of a typical stair, or multistory stairs which have been unpinned to create separate stairs. If pinned multistorey stairs have been used, specific annotations will only appear on the ‘master’ element.

Since we are using aligned dimensions, specific annotations will not be created if the stair is radial or has radial winders. Stairs with orthogonal winders are supported. The workflow is not designed to work with stringers. Instead, we are using the face of the stair run to host dimensions.

Part 1: Create views

The first step in documenting stairs with Dynamo is to generate the base views by creating both callouts from the GA floor plans, as well as generating both the longitudinal and transverse sections through the stair.

Before running the graph, it is recommended prefixing the view templates in Revit so that the user doesn’t inadvertently try to apply a section view template to a plan view or vice versa.

Dynamo Player Part 1

  1. Create a scope box around the stair. If required, manually rotate the scope box to ensure it is orthogonal to stair; otherwise, the graph will fail. 
  2. In Dynamo Player, select the scope box around the stair.
  3. Define the ‘Stair number’ input. This value is used to prefix the view name.
  4. Define the ‘View template for sections’. This value is the view template that will be applied for the new section views.
  5. Define the ‘View template for plans’. This value is the view template that will be applied for the new floor plan callout views.
  6. Define the ‘ViewFamilyType for sections’. This value is the view type typically associated with a drawing series.
  7. Define the ‘ViewFamilyType for plans’. This value is the view type typically associated with a drawing series.
  8. Select the GA floor plans in the Project Browser to reference the callouts.
  9. Press Play.

Computational logic

Once run, you should see in the Project Browser the new views that have been created. (Note that if your view template controls the grouping of views in the Project Browser, the views may not be immediately visible). All views are cropped based on the selected scope box. The sections are positioned ¼ of the extent of the scope box along the relative axis. And finally, the views are renamed as per the specified naming convention and a view template assigned.

New views created

Part 2A: Create annotations (floor plans)

The next part in documenting stairs with Dynamo is to annotate the floor plan callouts generated in Part 1. This process includes stair run tags, stair landing spot dimensions, number systems, and aligned dimensions. The graph will run on the current view only. Therefore, it will need to be run multiple times for each callout.

Before running the graph, ensure the desired stair run tag and spot elevation family are loaded into the project. The stair also needs to have a ‘Base Level’ and a ‘Top Level’ defined and not just an offset from the base level. Finally, ensure the current view is the floor plan to be annotated and that only the stair to be annotated is visible.

Dynamo Player Part 2A

  1. Define the ‘Dimension offset’. This value is the distance the crop region (scope box) will be offset and used as a reference to place the dimensions.
  2. Define the ‘Stair run tag offset below dimension’. This value is the distance to offset the stair run tag below the dimension segment.
  3. Define the ‘Family type for spot elevation’. This input is a text value and needs to be entered in exactly.
  4. Define the ‘General dimension style’. This input is a text value of the Linear Dimension Style to be used and needs to be entered in exactly.
  5. Define the ‘Family type for stair run tag’.
  6. Define the ‘Number system size’. This value is the text size of the riser/tread numbering.
  7. Define the ‘Number system justification’. This value defines how the number system text is justified. There are three choices: 0 = Front, 1 = Centre, and 2 = Back.
  8. Press Play.

New annotations created

Computational logic

Behind the scenes, the graph is doing many operations. Firstly, to generate dimensions, a room is needed to find the stair’s bounding elements to host dimensions. If a room already exists within the stair void, the graph will use this to determine the bounding elements. If not, the graph will place a new room.

The graph priorities stair flights going up from the current view’s level to avoid duplicate annotations from stacked stairs. However, if only the stair from below is visible, the graph will annotate that stair.

Dimensions are placed to the finished face of walls, and the side face of stair runs and landings. The graph is not designed to work with stringers. If curtain walls or nested curtain walls have been used, the dimensions will be to the inside face of the lowest transom (‘mullion’ in Revit language). Dimensions to stair landings take precedent over wall faces and stair run faces. Therefore, ensure the landing is aligned and locked to the wall to avoid errors. When the dimension is to a landing, the dimension text below is overridden to “LANDING”.

If a dimension returns ‘0’, this will likely be a result of elements not aligning, and the dimension is below the project unit tolerance and hence rounded to 0.

Stair run tag are repositioned and rotated to be located below the associated stair run dimension. Spot levels are centred on landings and created only for landings that are visible, that is, below the view’s cut plane.

Potential issues

If the dimensions don’t show correctly, the most likely problem is the Geometry Working Range. Unfortunately, this can not be changed within Dynamo Player and must be changed directly in Dynamo (Settings > Geometry Working Range).  Use ‘Large’ if the value range is between 0.01 to 1,000,000.

Part 2B: Create annotations (sections)

Next, we need to annotate the sections generated in Part 1. This process includes stair run tags, stair landing spot dimensions, number systems, and aligned dimensions. The graph will run on the current view. Therefore, it will need to be run multiple times for each view.

Before running the graph, ensure the stair run tag family is loaded into the project and that levels are visible so that they can be dimensioned. Finally, ensure the current view is the section to be annotated and that no other stair is visible. If needed, set the view’s far clipping to ‘clipping with plane’.

Dynamo Player Part 2B

  1. Specify the ‘Grid dimension top offset’ from the crop region.
  2. Define the ‘Level dimensions side offset’ from the crop region.
  3. Define the ‘Landing dimension side offset’ from level dimensions (Item 2).
  4. Specify the ‘Stair run tag dimension offset’ from landing dimensions (Item 3). 
  5. Specify the ‘Family type for spot elevation’. This input is a text value and needs to be entered in exactly.
  6. Define the ‘Grid dimension style’.
  7. Define the ‘General dimension style’. This input is a text value of the Linear Dimension Style to be used and needs to be entered in exactly.
  8. Define the ‘Family type for stair run tag’.
  9. Define the ‘Number system size’. This value is the text size of the riser/tread numbering.
  10. Define the ‘Number system justification’. This value defines how the number system text is justified. There are three choices: 0 = Front, 1 = Centre, and 2 = Back.
  11. Define the ‘Dimension location’ toggle.
  12. Press Play.

New annotations created in longitudinal section

New annotations created in transverse section

Computational logic

Two dimensions strings are created – The first between level elements and the second between levels and stair landings. If grids are visible, a horizontal dimension string will also be generated at the top of the view. Stair run tag are repositioned and rotated to be located below the associated dimension. Spot levels are centred on landings and created for all landings regardless of it they are in section or elevation. Number systems will be applied to stair runs both in section and elevation, unless they are hidden by other geometry (such as a central fire partition wall).

Part 3A: Create an empty sheet

This graph will create a single empty sheet, rename it based on naming conventions and assign properties so that it is categorised correctly in the Project Browser. If the sheet number is already in use, the sheet will not be created. If you need to create multiple sheets, refer ‘Part 3B: Create empty sheets from Excel’.

Before running the graph, ensure the title block family has been pre-loaded into the project.

Dynamo Player Part 3A

  1. Select the Title block family to be used. 
  2. Define the ‘Sheet number to be created’.
  3. Define the ‘Sheet name to be created’.
  4. Select the ‘Sheet type’. This input is an optional project parameter in the Project Browser used for grouping sheets.
  5. Define the ‘Sheet category’. This input is an optional project parameter in the Project Browser used for grouping sheets.
  6. Press Play.

Part 3B: Create empty sheets from Excel

To batch create empty sheets, we can reference use a drawing list from Excel. The Excel file should contain only the sheet name and sheet number information, organised in columns. If the sheet number is already in use, the sheet will not be created.

Before running the graph, ensure all headings and superfluous data is removed from the Excel file and that the title block family has been loaded into the project.

Dynamo Player Part 3B

  1. Define the ‘Excel file path’.
  2. Select the Title block family to be used.
  3. Specify the ‘Excel worksheet name’. By default, this is ‘Sheet1’.
  4. Define the ‘Sheet type’. This input is an optional project parameter in the Project Browser used for grouping sheets.
  5. Define the ‘Sheet category’. This input is an optional project parameter in the Project Browser used for grouping sheets.
  6. Press Play.

Part 4: Place views on a sheet

The forth step in documenting stairs with Dynamo is to place selected views onto a sheet. Up to four views are supported. Note that it is not possible to place the same view on two sheets. Therefore, if the view has already been placed on a sheet, the graph will return an error.

Dynamo Player Part 4

  1. In the Project Browser, select the views to be placed.
  2. Define the ‘Sheet to be used’.
  3. Define the ‘X shift”. Is the value viewports should be shifted in the x-axis to accommodate the title block, so they appear centred.
  4. Define the ‘Y shift”. Is the value viewports should be shifted in the y-axis to accommodate the title block, so they appear centred.
  5. Press Play.

Computational logic

The graph repositions the title block so that it is located at 0,0,0 on the sheet. The title block family must use the ‘Sheet Width’ and ‘Sheet Height’ parameters as this is used to determine the size of the sheet. The sheet is divided into thirds to determine the four centre points of the views. Views are sorted with callouts placed first, then sections. The graph does not split views if the view extends beyond the limits of the sheet. Views are numbered sequentially starting from the top left and working from left to right, and top to bottom. Viewports may overlap in which case these can be adjusted manually.

Part 5: Head height clearance

The final step in documenting stairs with Dynamo is to create 2D detail lines to represent the minimum head height clearance. This graph will only work for stair runs and landings in a longitudinal section as the graph is using the view’s cut plane. Elements in elevation will not be calculated.

Before running the graph, ensure a section view is active.

Dynamo Player Part 5

  1. Define the ‘Line style’. This input is the detail line type to be placed.
  2. Define the ‘Min. height’. This input is the clearance height measured vertically above the nosing.

Conclusion

Documenting stairs is an essential process – but it need not be time-consuming. Through advanced automation solutions such as this, it is possible to not only become more efficient but also become more consistent. To verify stairs compliance including riser height, going length, risers per stair run and clearance between top rails, check out this tutorial. Both Dynamo solutions are available as part of our Dynamo Package Development service. Contact us to find out more and discover how we can automate your Revit workflows.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.