Learn the Power of Dynamo for Automated Reinforcement Detailing – Part 1

Computational Design

By Tomasz Fudala

In this blog post I would like to demonstrate how to automate reinforcement designs with the Dynamo graphical programming interface using the example of standard rebar designs for window and door openings.

Revit 2019.1 comes with Dynamo 1.3.3 preinstalled, however the workflows covered in this blog post are compatible with Dynamo 2.0. When you try to run scripts presented in this post you should make sure you are using Dynamo 2.0, which you can download and install from dynamobim.org/download.

Dynamo 2.0 can be installed side-by-side with an existing 1.x version allowing you to have control over which major version you use for your project. In Dynamo for Revit, you will be prompted to choose which version you wish to run on first launch of Dynamo. This setting is cached per-session of Revit. A restart of Revit will enable you to change to a different version of Dynamo.

Building my Dynamo script I will be using Revit 2019.1 and the Structural Design 1.0.2 Dynamo package.

Structural Design package

The Structural Design Dynamo package supports various structural workflows in Dynamo and Revit (metric units only [mm]). The 1.0.2 version of the package mostly supports the reinforcement detailing workflows, however, moving forward the scope of the package will be extended.

Before getting started please make sure and verify the package is installed on your machine.

You can use the Search for a Package option if the package is not installed on your computer yet.

If the package is installed properly you should see it under the Add-ons.

 

Input Parameters

First, let’s define some input parameters.

Note: To define Straight Rebar Diameter and Diagonal Rebar Diameter and Stirrup Rebar Diameter input nodes you should use the RebarBarType node from the Structural Design package. It can be found under Structural Design->Rebar->Properties.

Double click the node title bar to rename it accordingly.

This is how the input parameters should look in Dynamo Player:

Get Window/Door Opening Characteristics

You may ask “What about the selection process? Where is any Select button to get a model geometry?

In this case I will create a different approach. Instead of clicking the Select button, I will set up input parameters and click the Run script  button to execute the script, and then I will be asked to make a selection. Once the selection is made the script proceeds its execution.

Let’s get started:

1) I will use the PickObjectsOfCategory node to define the selection functionality of my script. The node can be found under Structural Design->Model->Selection.

This node prompts the user to select multiple objects of the defined categories while showing a custom status prompt string.

  • category: Single category or a list of categories.
  • objectType (int): Specifies the type of object to be selected 0-Nothing, 1-Element, 2-PointOnElement, 3-Edge, 4-Face, 5-LinkedElement, 6-Subelement. Default value: 1
  • statusPrompt (string): The message shown on the status bar. Default value: “Click to select multiple elements, TAB for alternates, ESC quit”
  • preselection (bool): Takes into account the initially selected set of objects. Default value: false
  • refresh (bool): Refresh selection. Default value: true

In this case the user will be able to pick only elements of the Window and the Door categories.

2) Next, I need to retrieve window and door opening characteristics using a dedicated node from the Structural Design package.
The Geometry.GetWindowDoorOpeningCharacteristics node can be found under Structural Design->Model->Geometry.

Thanks to this node I can get:

  • Curves from which an opening is created.
  • Opening plane.
  • Opening host.
  • Opening host width.
  • Vector normal to opening plane.
  • Opening category.
  • Opening width.
  • Opening height.
  • Opening corner points.

3) Let’s get the rebar cover dimensions for the host of the selected opening element.

Straight Rebars

Now, based on the selected opening characteristics, I can create straight rebars around the opening.

1) First, I need to generate Dynamo curves which will be used during the creation of straight rebars. There is a dedicated node in the Structural Design package to do this.

As the above node needs two input parameters which are rebar diameters, I need to get a rebar diameter from Rebar Bar Type first.

2) Now I can connect all inputs with the right data.

3) Next, I can create Revit rebars using the FromCurve node (Structural Design->Rebar->Create).

Note: The respective vectors are taken from the Vector output of the Designs.OpeningStraightRebarCurves node. Vector is the normal to the plane that the rebar curve lies on.

4) Next, let’s set the Layout Rule property of newly created rebars to Fixed Number. The default number of bar positions in rebar set is 2, so no need to make a connect in this case as this is the number of rebars we want to set up.
Note:
The respective distribution length of rebar sets (arrayLenght) is taken from the Spacing output of the OpeningStraightRebarCurves node.

5) There is one more thing I am going to include in the logic of creation of straight rebars. When the Top Stirrup is Closed input parameter is True, and the Two Layers parameter is True too, then I would like to have the top straight rebars copied to create reinforcement of a lintel. To do this, let’s filter out top bars first.

6) Next, if the conditions are met then we copy filtered rebars.

7) Of course, we need to determine a vector that is used when we copy elements.

Note: In this case we don’t perform an operation on a Dynamo geometry when we copy elements, but instead when we copy Revit objects. The Geometry.CopyElement node copies an element and places the copy at a location indicated by a given transformation (Structural Design->Model->Geometry).

The version 1.2.2 of the package is optimized for Dynamo Revit 2.1 and Revit 2020.1. Take a look at the “extra” folder for some examples that can be used with the Dynamo Player. Contact with the author if any questions: @tomekf

The final script covered in this post can be found in the extra folder.

In my next post I will continue to develop this script and I will:

  • add Diagonal Rebars
  • add Boundary Stirrups
  • and set up Rebar Visibility

Continue reading: Learn the Power of Dynamo for Automated Reinforcement Detailing – Part 2

@tomekf

Related Articles

Add comment

17 comments

  1. TLN_MTHV

    Awesome!! I got an error at Properties.getrebarcover Node."Warning: Dictionary.valueatkey operation failed.". I created new list for dimensionParamNames as "rough width, rough height" then i got this error. im using revit 2019.2 and structural design package 1.1. Hope you can help me to solve this.

    1. Tomasz Fudala
      Tomasz Fudala

      Probably you used non English version of Revit UI. Please install the latest version of the package, the current version of the package has this issue fixed already.

  2. velimir.pavlic@ingolab.hr

    Hi, can you help me why the script does not work. It appears "Run completed with errors". Can you help me, this script would help me a lot

    1. Tomasz Fudala
      Tomasz Fudala

      This update might help you: https://blogs.autodesk.com/revit/2019/02/07/structural-design-package-version-1-0-5/ Now you can find two additional parameters to override default (English) names of parameters.

    2. velimir.pavlic@ingolab.hr

      Yes, I read the article. I installed The Structural Design Dynamo and the script looks okay. The unit I use is millimeter, I work in revit structure, the German standard. I tried Englishstandards where he wrote the height and the width but simply does not draw reinforcment. What matter is the type of wall or window? Finally writes Run completed with errors but I can not see the errors

    3. Tomasz Fudala
      Tomasz Fudala

      Hello. What kind of error? Did you read the article? How can I help you?

  3. Avatar
    Arciviz

    Any method use UI in API (MS . NET) & programs in Dynamo https://www.youtube.com/watch?v=-YhtI5e7dtg

  4. jiandanlll

    Is there any way to get this to work with 2018 ?

    1. Tomasz Fudala
      Tomasz Fudala

      The Structural Design package 1.0.2 works with Revit 2019 and Dynamo 2.

  5. Avatar
    chubbard

    Is there any way to get this to work with 2018 Dyamo 2.02?

    1. Tomasz Fudala
      Tomasz Fudala

      The Structural Design package 1.0.2 works with Revit 2019 and Dynamo 2.

  6. einarrb

    Great stuff! Is the source code of the package available on GitHub or something like that?

    1. Tomasz Fudala
      Tomasz Fudala

      I am glad you like it! The source code is not available on GitHub.

  7. qoqo1065@naver.com

    I'm still waiting, Adding Diagonal Rebars / Boundary Stirrups. What you've done is so amazing! Thanks.

    1. Tomasz Fudala
      Tomasz Fudala

      https://blogs.autodesk.com/revit/2018/12/13/learn-the-power-of-dynamo-for-automated-reinforcement-detailing-part-2/

  8. Avatar
    htlcnn

    Hi, Thanks for the tutorial and the package. Do you plan to make the package available for Dynamo 1.3?

    1. Tomasz Fudala
      Tomasz Fudala

      I don't as Dynamo 1.3 will be obsolete soon.

The Revit blog is your place for product updates, workflows, and discussion of all things BIM.

Subscribe to keep up with Revit

© 2020 Autodesk Inc. All rights reserved