twitter youtube facebook linkedin email
Connect with:

BIM and Beam

In this post of the Structural Precast series I would like to show you how in Revit we can easily add grout tubes and tubes on top to precast walls.

Grout tube and tube on top are families that come with the installation of Structural Precast Extension for Revit. They are both face-based families. When modeling you can use them or your own families.

In Revit, there are a few ways how these elements could be added to precast wall assemblies.

First, I would like to show you a traditional, manual way.

  1. We simply start the Place a Component command.
  2. Then select a family and a type.
  3. Next select a wall face. Note: Orientation of grout tubes depends on which side/surface of a precast wall has been selected.
  4. Then a position of these elements can be further adjusted using built-in Revit capabilities. For example, you can specify a distance from the edge, distance between elements, use copy or mirror tools etc. …

As you probably noticed already the process itself is pretty straight forward however it can be very tedious and it takes a lot of time as we need to do the same for every single precast wall instance.

This is a situation where Dynamo for Revit comes in handy. Let me show you my automated process of adding tubes to the Revit model.

I made a few assumptions:

  • My Dynamo script should be ready to be use in Dynamo Player.
  • It should work with multi-selection of precast walls.
  • Input parameters should allow selection of types of elements as well as their precise placement.

As a result I ended up with a Dynamo script with the following input parameters in Dynamo Player:
Let’s have a look inside the Dynamo script. First, I need to retrieve selected faces.

Next, I have to check the orientation of my faces.

My Python script checks if the beginning of local coordinate system of my surfaces is at the top or bottom and it calculates a rotation angle for grout tubes.

Now it’s time to get information about lengths of my wall parts.

Now I have all data needed to calculate coordinates of insertion points for both grout tubes and tubes on top.

My next Python script helps me calculate where insertion points should be located taking into account all input parameters:
Python script

And finally I can add these tubes to my Revit model in the right location and with correct orientation. Here I used the Springs.FamilyInstance.ByFacePoints node available in the Spring Node package.

Adding Grout Tubes and Tubes on Top

All nodes:
All Nodes

This automated process of adding grout tubes saves tones of manual and tedious work and save a lot of time.

Watch video:

For more posts on structural precast in Revit, check out these past articles on BIM and Beam:


Adding Grout Tubes to Precast Walls using Dynamo

Featured Links

Tomasz Fudala

Tomasz Fudala is the Technical Marketing Manager for Structure. He has over 17 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


View by:
Most Recent Oldest
  1. Avatarm.jankowskiTG5ET



    Hi, the script is awesome, but I have problems with my copy. First off all I cant find SortByFunction, (I have got List.Sortbyfunction but it doesnt work with many surfaces) Another problem is with python scripts, there are exactly the same with yours but: “Traceback (most recent call last):
    File “”, line 10, in
    TypeError: iteration over non-sequence of type Vector” this error arrives when started… I have already checked if there is a string but no… I need help with this

    1. Tomasz FudalaTomasz Fudala (Post author)



      Screenshots and datasets you use would be welcome in this case.

      List.Sortbyfunction works well with many surfaces – make sure you set up your list level properly.

    2. Tomasz FudalaTomasz Fudala (Post author)



      Like I was saying: You did not set up your lists level properly. Make sure the Use Level option is activated in your nodes.

  2. Pingback: The Precast Show – Shannon Smith LLC

  3. Pingback: The Precast Show - BIM and Beam

  4. AvatarErwinMeulman



    Cool script, I made a copy but I get a error, can you tell me what’s wrong?

    1. Tomasz FudalaTomasz Fudala (Post author)



      Because there are no begin/end brackets in Python the script has to be properly formatted and this is your main issue.

      For example:

      You have also typos…For example: if x0):




    Hi Tomasz

    I am making the dynamo script you have set up. but I get an error when I write the first pyton script of yours.

    It looks like this
    import clr
    from Autodesk.DesignScript.Geometry import *

    vectorN_list= IN[0]
    orginLocation_list = []
    rotation_list = []

    for vectorN in vectorN_list:
    #origin point location
    vector0 = Vector.ByCoordinates(0, 1, 0)
    angel = Vector0.AngleWithVector(vectorN)

    x = round(vectorN.X, 2)
    y = round(vectorN.Y, 2)

    if x0):
    originLocation = “BOTTOM”
    originLocation = “TOP”

    #Rotation angle
    if y>0:
    rotation = 180
    elif y0 and y==0:
    rotation = -90
    rotation = 90


    OUT = originLocation_list, rotation_list

    The mistake it writes is that in line 12 NameError: ‘vector0’ is not defined

    1. Tomasz FudalaTomasz Fudala (Post author)



      Python language is case sensitive. You defined vector0 and then you used Vector0.