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.
- We simply start the Place a Component command.
- Then select a family and a type.
- Next select a wall face. Note: Orientation of grout tubes depends on which side/surface of a precast wall has been selected.
- 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:
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
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:
- Segmentation of Precast Walls in Revit
- Structural Precast for Revit – Configuration Settings
- Autodesk Structural Precast Extension for Revit Software Overview
- Announcing Autodesk Structural Precast Extension for Revit 2018, a notable step toward the future of automatically making structural things
- Precast Column with Corbels in Revit
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
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.
Screen and script in link below:
https://we.tl/t-St1KPFvYVS
Like I was saying: You did not set up your lists level properly. Make sure the Use Level option is activated in your nodes.
Pingback: The Precast Show – Shannon Smith LLC
Pingback: The Precast Show - BIM and Beam
Cool script, I made a copy but I get a error, can you tell me what’s wrong? https://drive.google.com/
Because there are no begin/end brackets in Python the script has to be properly formatted and this is your main issue.
For example:
http://www.openbookproject.net/books/bpp4awd/ch04.html
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
clr.AddReference(‘ProtoGeometry’)
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”
else:
originLocation = “TOP”
#Rotation angle
if y>0:
rotation = 180
elif y0 and y==0:
rotation = -90
else:
rotation = 90
originLocation_list.append(originLocation)
rotation_list.append(rotation)
OUT = originLocation_list, rotation_list
The mistake it writes is that in line 12 NameError: ‘vector0’ is not defined
Python language is case sensitive. You defined vector0 and then you used Vector0.