twitter youtube facebook linkedin email
Connect with:

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

Tomasz Fudala

In this blog post, I’ll continue the subject I started a few weeks ago. In Part 1 I covered how structural engineers and detailers can automate reinforcement designs with Dynamo in the example of straight rebars around window and door openings. Let’s extend the functionality of the script by adding additional rebars for wall openings.

Diagonal Rebars

The Dynamo script I built in  Part 1  can be found here. Creating diagonal rebars is very similar to what we have done for straight ones.

1) Before we wire the OpeningDiagonalRebarCurves node to the right data, we need to calculate a spacing between diagonal rebars.

2) Now, we are ready to generate curves for diagonal rebars.

3) Now, it’s time to create rebars in Revit.

4) The final step is a definition of a rebar set if  spacing is greater than 0 (Two Layers is true).

 

Rebar Visibility

Before we move on, let’s take care of rebar visibility as we would like to have the generated rebars presented as solid and unobscured in the active view.

1) First, let’s group all rebars we created so far into a list.

2) Next, let’s retrieve the current active view.

3) To set up rebar visibility we will use the SetUnobscuredInView and the Create.SetSolidInView nodes. The second node takes a 3D View as an input parameter, so we need to check if the current view is a 3D View.

4) Finally, we can set up rebar visibility. The unobscured and solid input parameters are true by default.

Boundary Stirrups

Let’s continue and create the remaining rebars. Now we are going to create top boundary stirrups.

As you can see on the above image depending on the Top Stirrup is Closed parameter value (true/false) we will be getting two different types/shapes of stirrups.

In the Structural Design package, you can find two respective nodes that support creations of these two shapes (Structural Design->Rebar->Designs).

Returns closed stirrup shape rebar curves.

Returns U-shape rebar curves.

They both also return the normal vector to the plane that the rebar curve lies on.

1) First, we need to retrieve all top curves openings that were collected during the selection process. To get such list of top curves we need to collect all second items of the Curves[ ] list.

Note: That in this case we’re getting 4 items as 4 openings were selected.

2) Next connect the right data with the *ShapeCurves

3) Later we will need the lengths of the curves so let’s get these values using the Design Script syntax.

4) Having the stirrup geometry defined, it’s time to add a logic that will manage what kind of stirrup is used. We will do this using the Python Script. Our simple Python Script will return the result of the node’s inputs passed through an embedded IronPython script. We will define 3 inputs:

  • condition – a value of the Top Stirrup is Closed parameter
  • closedStirrups – a list of curves to create closed stirrups
  • uShapeStirrups – a list of curves to create U-shape stirrups

5) Next, we need to translate a representative stirrup the half stirrup spacing distance along the top border of the opening.

6) Now we can create rebars in Revit, but before we do this we need to check if the creation of stirrups makes sense (if the Two Layers parameter is True). Again, in this case we will use the Python Script node and write a simple script.

7) Because the RebarHookType depends on the Top Stirrup is Closed parameter, we need to check it first and then connect the right type to the FromCurves node.

8) Now we are ready to create rebars.

9) To define a rebar set from our stirrup we need to calculate arrayLength In this case again we can use the Code Block node to provide a formula and renaming the node we can call it respectively.

10) Finally, we have everything to create a set of stirrups.

The process of creation of the bottom and side rebars is very similar. The final script can be found here.

Summary

The visual programming interface of Dynamo gives structural engineers the tools to build optimized structures with minimal energy, and subsequently make their own design tools. Based on the Revit Platform, we can use our creativity to develop optimized structural systems using computational logic in an advanced building information modeling environment.

The combination of the Revit information database and scripting with Dynamo opens a world of possibilities to working fast with complex and optimized structures. The exercise we have gone through provides just a few examples. Now, make your own design solutions and share them with the world!

@tomekf

What is BIM (Building Information Modeling)?

Free Form Rebar - Aligned Distribution

Featured Links

Tomasz Fudala

Tomasz Fudala is the Technical Marketing Manager for Structure. He has over 15 years of experience in the software industry and a comprehensive background and vast knowledge of structural solutions in the Autodesk portfolio. With a Structural Engineering background he is responsible for technical sales readiness. He achieved a Master of Science degree in Structural Engineering from the Cracow University of Technology, Poland. Find him on Twitter @tomekf

33 Comments

View by:
Most Recent Oldest
  1. Avatar01eng.it

    0

    0

    Hi Tomasz
    I can’t select openings in my model, where am I wrong? (trying with both Revit 2019 and 2020)
    Thanks in advance
    Umberto

    1. Tomasz FudalaTomasz Fudala (Post author)

      0

      0

      Your doors and windows are nor visible in your Revit view.
      Please make sure in the Visibility/Graphic Overrides dialog you have the Doors and Openings categories checked 🙂

  2. Avatarmario.muellerZ5NFD

    0

    0

    Hi Tomasz,
    we are using the opening familiy from Sofistik’s Bimtools (works with voids). Is it possible to run your script with that categorie “generic models” as well, respectively could it be changed so that it works?
    thanks in Advance!

    1. Tomasz FudalaTomasz Fudala (Post author)

      0

      0

      Hi Mario,
      I developed and tested this only with the windows and doors categories in mind. The script gets the number of information from selected objects(e.g. a type: checks if a door or a window is selected) and then depending on a type of an opening it generates rebars respectively. I believe the script could be adjusted to your needs – the selection & retrieve data part of the script would need to be adjusted then.

  3. Avatarabdu2736

    0

    0

    hello TOMASZ,
    how long did it take you to finish the whole script:)?

  4. Avatarm.jankowskiTG5ET

    0

    0

    I have a problem with this script when i try to launch it in Dynamo player. I have an error with System.Xml.XmlException

    1. Tomasz FudalaTomasz Fudala (Post author)

      0

      0

      It’s clearly said the package works with Dynamo 2. You run it with Dynamo 1.3 that’s why you have a problem.

  5. AvatarKagaKitsune

    0

    0

    So like a few others I can see I am having a problem after selecting my openings. They work through the Selection.PickObjectsOf Category and gives outputs. Entering the next node being the get opening characteristics it gives only null values and I am making sire to use default windows and doors built into revit and still only given null values. Is there a node we need to feed selection into before geometry?

  6. AvatarabmaSSNAN

    0

    0

    Also, do you think it could be the problem because I am using Revit 2019 so I should update to 2019.1 or 2019.2
    Do you have any idea when we can be will be able to change The Geometry.GetWindowDoorOpeningCharacteristics node I am working on reinforcement for Beam and column with Dynamo but this time I am using DataShap to select the structural framing and faces, and I would like you to take a look on it, do you have any mail that I can send the scripts
    Thanks you 🙂

    1. Tomasz FudalaTomasz Fudala (Post author)

      0

      0

      It works with Revit 2019.2 too.
      If you would like to share your script please use Dropbox, Box or any other service.

  7. AvatarabmaSSNAN

    0

    0

    Dear Tomasz,
    thanks a lot for sharing the information with us,
    i just have a small problem what i can select the Door/window opening when i run the script, note that i can select it without running the script, i already check *Visibility/Graphic Overrides dialog you have the Doors and Openings categories checked*….
    i have another question, is it possible that you show how to change python string “Width” and “Height”, because it’s not easy to change for big projects,
    thanks in Advance 🙂

    1. AvatarabmaSSNAN

      0

      0

      and another issue, do you think if the opening has a different name than “Width” and “Height” I won’t be able to select it?

    2. Tomasz FudalaTomasz Fudala (Post author)

      0

      0

      The Geometry.GetWindowDoorOpeningCharacteristics node will be updated soon. You will be able to overwrite the names of parameters then.

    3. Tomasz FudalaTomasz Fudala (Post author)

      0

      0

      I am not getting your issue, could you be more descriptive or provide a short video or a screenshot?

      You are saying that “you can select windows and doors without running the script” – so my question is why wouldn’t you able to select them 🙂 – your statement is without a context. If you meant that you want to have your preselection taken into account when running the script you should set up the preselection parameter as true. By default the selcetion node has this input parameter set as false.

      The Geometry.GetWindowDoorOpeningCharacteristics node will be updated soon. You will be able to overwrite the names of parameters then.

      Hope that helps and answers to your questions.

    4. AvatarabmaSSNAN

      0

      0

      Dear Tomasz,
      (i think I had misspelling ) thank for your support
      thanks a lot for sharing the information with us,
      i just have a small problem that i can’t select the Door/window opening when i run the script, but i can select it without running the script, I already check *Visibility/Graphic Overrides dialog you have the Doors and Openings categories checked*….
      i have another question, is it possible that you show how to change python string “Width” and “Height”, because it’s not easy to change the parameters when I am working on big projects,
      thanks in Advance 🙂

  8. Avatarjiandanlll

    0

    0

    Running the script prompts the error Selection.PickObjectsOfCategory node.”The user aborted the pick operation.”

    1. Tomasz FudalaTomasz Fudala (Post author)

      0

      0

      Question: Did you select any windows or doors? You need to select at least one.

    2. Avatarjiandanlll

      0

      0

      When I run the script, I can’t select windows and doors.

    3. Avatarjiandanlll

      0

      0

      Geometry.GetWindowDoorOpeningCharacteristics is error.I want to know how to adjust Revit in Chinese version.

    4. Avatarjiandanlll

      0

      0

      It’s done! Thank you very much!

  9. Avatarjiandanlll

    0

    0

    I’d like to see your complete dyn file, okay?

    1. Tomasz FudalaTomasz Fudala (Post author)

      0

      0

      There is a link to the final dynamo script (*.dyn) at the end of the post.

    2. Avatarjiandanlll

      0

      0

      This website can’t open, can you send me a mailbox?

    3. Tomasz FudalaTomasz Fudala (Post author)

      0

      0

      It works well. Make sure you click the download button…

  10. Avatarahduo

    0

    0

    Thank you for your effort. I used the node for generating rebar with Create.FreeFormRebar . But I found that there is a limitation on the rebar location points number. The number is 1002. I want to ceate a sprial rebar with 2600 points. Is there some way to generated it with Create.FreeFormRebar?
    I will appreciate for your answer.
    Thank you in advance

    1. Tomasz FudalaTomasz Fudala (Post author)

      0

      0

      Could you send your datasets (rvt+dyn)? I need to better understand a problem you are trying to solve.

    2. Tomasz FudalaTomasz Fudala (Post author)

      0

      0

      Why did you use the Create.FreeFormRebar node?
      To get a spiral rebar you should:
      1) Create a set of dynamo arcs based on your column geometry
      2) Create a rebar element (stirrup) using the Create.FromCurves node
      3) Next you should use the Create.SetRebarShapeId node to change the rebar shape to the shape #53 (spiral).
      I hope it helps you.

  11. Avatarabdu2736

    0

    0

    DEAR TOMASZ,
    Thank you for your effort, I tried you to use this script for an example project, but unfortunately, when I run the Dynamo play and I go to Revit it doesn’t let me select the window opening when I press finish I got an error message “Run completed with errors”, I hope I can get feedback on how I can do it 🙂

    Have a nice day

    1. Tomasz FudalaTomasz Fudala (Post author)

      0

      0

      Please make sure in the Visibility/Graphic Overrides dialog you have the Doors and Openings categories checked 🙂 then you should be able to select openings and run the script without any issues. Also you should use metric units in your project – Length [mm].