Element View Generation in Revit with Dynamo – REVISED

In October 2015, I wrote this post on this blog about how to automate the generation of detail (section) views of some specific Revit elements by means of a Dynamo graph. With the functionalities available at that time in Dynamo, that workflow was a bit devious and hard to modify.

To simplify the whole workflow I created some new custom nodes that make it possible to detect the local axes of a Revit element, which then can be used as orientation vectors for the several section views.

Before you start playing yourself with the script (which is provided at the bottom of the post as usual), you’ll need to first install the package BIM4Struc.Productivity from the package manager in Dynamo. This package contains a few specific nodes such as:

  • Create Element View : node that helps creating views based on the bounding box of a selected element and some indicated orientation vectors.
  • Element.LocalCoordinateSystem : returns the insertion point and X, Y, Z orientation vectors of a selected element (also works on Structural Columns).
  • Vector Visualizer : visualizes a 3-vector system in Dynamo (Red-Green-Blue = XYZ)

In the example graph you’ll learn how to apply the methodology in several ways for Structural Columns, Structural Framing and Generic Models. The system is almost for any case the same. Below I’ll explain you how to use it on Structural Columns.


1. Boundary Offsets

The two sliders in this group define the size of the section view crop region and its view depth.

2. Object Selection

You can either choose to select all elements of the category Structural Columns or you choose them manually by picking them in the Revit graphical user interface with the Dynamo node Select Model Elements.

3. Get local principal vectors

The goal of this group of nodes is to define the orientation vectors for the section views. These vectors will define the width (x-vector), height (y-vector) and depth (z-axis) of the section view.

As we want the view to be aligned with the orientation of the selected Revit element, these vectors are defined by the element’s “local coordinate system”. That’s where the custom node Element.LocalCoordinateSystem comes to the rescue.

The “Boolean” node allows you to switch the direction of the section view.

The …/ List.Join nodes group then the several combinations of x, y and z, in order to get a cross section, front view and side view of the element. These lists are later used as input ports for Create Element View node at the end.vg2

4. Definition of the View Names

Another input the Create Element View node needs is a “View Name“. This section helps to automate the definition of these names, based on the element’s parameter value for “Mark”.vg3

5. Element Subsets

As per element we need 3 different views, a simple cycle of elements is done, so the input for the Create Element View node is simplified. This means that the number of elements in the List.Cycle node equals the number of elements x number of view types.vg4

6. Definition of View Center

One more input we need for the Create Element View is the center point of the view. The crop region of the section view is then centered around that point, taking into account the boundary offsets, defined earlier in the graph.

It doesn’t matter how you define this center point. In this case, two methods are shown. The top one uses a point that is vertically offsetted from the element’s insertion point. The bottom one simply takes the centroid of the solid of the Revit element.vg5

7. View Creation

At this last part of the graph, all defined properties are connected with the custom node Create Element View from the BIM4Struc.Productivity package.

The X- and Y-vectors defined in step 3 define the width and height orientation of the crop region of the section view.

The CropRegionOffset and ViewDepth are defined in step 1 with the Boundary Offset sliders.

The CSPoint is a the center point (step 6) of every section view for the appropriate element. (Mapped with the List.Cycle node from step 5).

The Revit Elements are needed as the Create Element View node is detecting the size of the elements to defined the minimal size of the crop region of the view.

A name for ever generated view is needed. This can be defined through the ViewName input, and is defined in Step 4 of this graph.


The results is similar to the one from the previous post.101515_2156_AutomaticEl2.png

Known Issues

There are also a few limitations to this workflow that you should be aware of:

  1. When the views for a selected element already exist, then Revit will return an error message and the Dynamo graph won’t be executed at all.
  2. When you run the Dynamo graph, then add annotations to a generated view, and then rerun the Dynamo graph in the same session, then all these annotations will be disappear.


A dataset containing the Revit file without the generated views and a Dynamo graph prepared for Structural Columns, Structural Framing and Generic models can be downloaded here.

Fire Exit Risk Assessment with Revit and Dynamo

In the meantime, we’ve all rolled into 2017 now. So with that I would like to send you my best wishes for this New Year. And above all, I wish you even more Dynamo awesomeness in 2017! That being said, I want to kick off the Dynamo Year 2017 with this post.

When we think about “Fire Exit Risk Assessment” in an architectural BIM model, then we also think about the creation of “evacuation plans” for the building. In a lot of situations this is done manually based on estimations of the shortest and easiest way to reach an indicated “emergency exit”. I’ve tried to tackle this challenge by automating the definition of the shortest routes between a room exit and the nearest emergency exit. Of course, all of this is done with Autodesk Revit and Dynamo.

In this post I want to explain you how you can build this type of script yourself and as usual you’ll find the datasets at the bottom.


The model that is used is shown on the images below. The script needs to detect the shortest route between a “normal” room exit door and one of the 4 indicated “emergency exit” doors at ground level. Therefore a room plan at that level is created and the rooms that can be used as “circulation”, which are the corridors in this case, are indicated in orange.


The result of the script is the creation of evacuation routes for each room exit to the nearest emergency exit. In Dynamo this looks as follows:

When using the Dynamo curves to create Revit detail lines from them, this results in nice evacuation plans like shown in images below.

How to create the script

Before you start experimenting with the Dynamo script, provided at the bottom of the post, I would strongly advise you to watch the detailed recording with voice-over, I have made available on my YouTube channel. It will explain you step by step how to read the Revit model, analyse the circulation area, defined the shortest routes and finally how to automate the creation of the detail lines in Revit, representing the evacuation paths.


The Dynamo script and the model can be all downloaded here.

Construction Dynam(o)ite at AU 2016

Autodesk University 2016 is already gone again for a few weeks now, and most of us digested all the information. There was a lot of Dynamo awesomeness again this year: 40 sessions dedicated to this great piece of software. That’s a record.

One of the classes I have hosted over there, was about the usage of Dynamo in the construction industry: “CS21553 – Construction Dynam(o)ite-Explode Productivity with Dynamo“. In that class I presented two specific use cases:

Live Design Clash Verification

In this first part, I showed how to make a live link between Revit and Navisworks with Dynamo and improve clash free designs upfront the BIM process. You could learn how to get feedback from Navisworks in Revit by means of clash indicators and isolated clash views, as showed in the picture below.

Crane Positioning Optimization

The second use case that I presented was all about the analysis of the position of a crane on site. I got inspired initially by Jesper Wallaert from MT Hojgaard in Denmark. You could learn how to perform your own site planning diagnostics on a structure by checking the range capacity of a tower crane. But it went further than that. Through “Parametric Run” techniques and “Genetic Optimization” we arrived at the point where Dynamo and Project Fractal decided where the ideal position of the tower crane would be.

The movies that are used in the class can be viewed now in this YouTube playlist.

Datasets and handout

Don’t worry, it’s not too late for you to learn more about all of this. The recording, datasets, handout and presentation of the class are now available here. So go ahead, and browse the AU Online Class Library !

Rebar Shape Images in Revit

Since a few versions already, Revit allows us to add an image to a family instance or type. with the “Image” or “Type Image” parameter. For Rebar families specific there is the “Shape Image” parameter, which makes it possible to create well formatted rebar bending schedules, including the rebar shape image.

Out-of-the-box, Revit offers Rebar Shapes according to the local requirements and codes for a lot of countries around the world. These Rebar Shapes don’t contain these Shape Images, to make it possible for you as a user to customize this.

For rebar schedule representations during demos of “Rebar with Revit”, I edited the default rebar shape families and added the shape code images according to BS8666 : 2005, to the Shape Image parameter. This resulted in these nice formatted bending schedules for a simple reinforced concrete tunnel.
3d-rebar rebar-section


The content that is used for this small model can be downloaded below:

  • Rebar Shape Families with Shape Images according to BS8666:2005 :
    Download here
  • Shape Code Images according to BS8666:2005 :
    Download here


Winning With Dynamo Webinar


The webinar “Winning With Dynamo” I hosted on 18th October 2016, 1pm CEST, tells you more about how Dynamo can change the way you think, design, analyse and produce buildings.

Did you miss it, and still want to see it? Then all you have to do is follow this link and watch the recording.

Have you seen it, got inspired by it, but would like to dive in the scripts that were demonstrated? Then you’re lucky again. Click here to download the content. Some of the content refers to other links, like Autodesk University classes, where you can see additional recordings of my presentations on the specific topics.

Concrete Bridge Construction Workflow

In the previous post, I talked about the “Detailed Design” of a concrete deck bridge and a possible workflow to connect it with the road design models. As the design of the reinforced concrete deck is made with Revit, we can profit of this rich BIM data model:

  • The separate elements are provided with metadata to identify them on site
  • Rebar objects are modelled into detail
  • The deck is divided in construction parts
  • Bending schedules are generated in the Revit model
  • The design is documented in detail with several views and sheets

Flyover RenderingDisplacement Sets Bridge
Rebar documentation

Now we have all of this valuable information, we should use it for the further construction of the bridge. The image below shows which Autodesk products could be used throughout the several construction phases of the concrete bridge project.

Product Mapping Construction Phase

Together with my great team mate Lee Mullin, one of the authors of the Beyond Design blog we have documented some great workflows where the Revit model of the concrete bridge is used as basis for Review, Clash Detection, Quantification, Construction Sequencing and Field Inspections.

The results are 12 new videos in the Concrete Bridge Design to Fabrication Workflow playlist on my YouTube channel, numbered from 17 to 28. The videos mainly represent some important possibilities of BIM360 Team (formerly A360), BIM360 Glue, BIM360 Field and Navisworks Manage.


When the created views in Revit are uploaded to BIM360 Team, external companies which are invited to the project, can review the model and add markups to it, all online, with a desktop or mobile device, connected to the internet.

Share designs on the cloudSome examples on this workflow are shown in the videos 17 and 18 from the playlist.

With A360 Viewer the model can be viewed online by anyone with the link. Want to test it yourself? Try this link.


As we say that with a BIM centric method, we build the construction before it’s built, then Multidiscipline Coordination is a very important process.

Multidiscipline CoordinationWatch this workflow in videos 19 to 23 of this playlist.


Getting the right quantities of the construction is another advantage of a BIM centric design method. Geometric and metadata are stored in the Revit model and can be displayed in Revit schedules or in a comprehensive quantification process in Navisworks.
QuantificationWatch this workflow in video 24 of this playlist.


Another important task to perform on the BIM model is the simulation of the construction. Which parts of the construction need to be on site when? What part is already constructed? Get more understanding of the project with timeliner simulations. This process is even easier when Parts are used in the Revit model, which is done in this case for the bridge deck.
Construction Sequencing
Watch this workflow in videos 25 & 26 of this playlist.


Finally, when the bridge is constructed, lots of inspections need to be done too. The workflow below shows how the Rebar Inspection and the Bearings Inspection are digitally performed with BIM360 Field.
Field Management  Watch this workflow in videos 27 & 28 of this playlist.

These workflows are just a small selection of what can be done with the BIM360 Portfolio in the infrastructural world. Enjoy the watching !


Concrete Bridge Design Workflow

The last few months I’ve been working intensively on a complete workflow for detailed design of concrete bridges with Autodesk Revit. In case you would ask me “Is Revit even capable of designing bridges with a high level of detail?” Well, my answer would be “Definitely YES !” And I would like to share you the results in what is probably my longest post ever on this blog. So take your time to read it…


Before I start explaining, maybe some background first. Some months ago, I needed to develop a POC of bridge design with Revit for some important customer meetings. In the past you might have seen already a solution from my colleague at Autodesk, Matthias Stark, which he explained in this class at AU 2015. Also Simon Moreau, author of the BIM42 blog based himself on this method in this post. So first of all, thank you Matthias and Simon for the inspiration. The workflow below is a consolidation of Matthias his method and the method I already used previously. The result is an easy to use flow, applicable on any type of concrete deck or box bridges or even concrete tunnels, using some Dynamo scripts that I have predefined for your personal use. All the data referred to can be downloaded at the bottom of this post.

Flyover RenderingFlyover Real


The full workflow from conceptual road/bridge design until detailed bridge design consists of 16 steps, which are all explained in this YouTube playlist “Concrete Bridge Design to Fabrication Workflow”. The image below shows a global overview on this workflow. This is a representation of what is possible currently possible with our solutions at Autodesk, and shows a positioning of the products for each phase.
Conceptual to Detailed Design Workflow Overview

  1. The conceptual road and bridge design can be done using Infraworks 360.
  2. This Infraworks model is then imported in AutoCAD Civil 3D for further detailing of the road design.
  3. The data, built up in AutoCAD Civil 3D, is then reused in Revit and Dynamo (by means of Feature Lines, Corridor Points reports, …) to get the detailed bridge design.
  4. Finally the bridge rebar detailing and design documentation are further processed in Revit.

This workflow is also setting the base for extended construction workflows. As all the concrete bridge design data is stored in the Revit model, it can be used in Construction Management (sequencing, quantification, clash detection) and Project Delivery Management. This involves BIM360 Glue, BIM360 Field, Navisworks Manage, BIM360 Docs,… An overview of the possible workflows can be found in the Bridge Design to Fabrication Workflows.pdf file which is included in the datasets at the bottom of this post.

So, this post is limited to the design steps with the creation of the superstructure deck family and the distribution of transversal rebar in the deck.


Before building this family, I listed up some requirements which the bridge deck family should meet.

  • The superelevation, width and thus also the slope for each lane are calculated from the Civil 3D data.
  • The family needs to be flexible and modifiable afterwards in the Revit project.
  • The Dynamo script used for the creation should be as small as possible and should be generic to use with other bridge sections or even tunnels.
  • The family should be built up that way that it can host annotations in 2D Section views (even if the section goes through a curve).
  • The family needs to be able to host rebar.
  • The Dynamo script needs to be able to handle any orientation of a bridge (seen in a planview), in any position of a circle quadrant.

Meeting these requirements, this method differentiates from current methods existing already on the internet.

Detailed Design of Concrete Superstructure

As you will see in this part of the playlist, the superstructure is created based on Civil 3D Corridor points and a Mass family representing the section profile of the deck. This “profile” is placed within the Revit main “Concrete Deck” family and then lofted to get a solid geometry.


Before you start trying this yourself you need to install the package BIM4Struc.BridgeDesign through the Package Manager in Dynamo.

The Dynamo script “01 Bridge Superstructure Creation.dyn” used for this, is included in the datasets at the bottom of this post.

Step 1 – Extract Civil 3D Corridor Points

The geometry of the bridge deck should be based on the solid geometry of the road, which is designed in AutoCAD Civil 3D. Important is that the slopes of each lane of the road can vary along the road length (ie. from -2.5% to +2.5%). This information is extracted from Civil 3D using the “Corridor Points Report” and this data is stored in an Excel sheet. In this method it needs points for the Top Left, Top Right and Top Center edges of the road. Using Marker Points in Civil 3D you can give your own names to these points. This step is explained in this video.
Corridor Points Report

Note: the reason why I used the Corridor Points Report and not just Feature Lines as an imported geometry in Dynamo, is explained in the reactions on this post (click on the balloon next the post title).

Step 2 – Create the section profile

As part of the “mise-en-place” you also need to create a family representing the section profile of the deck (T-deck, box girder or even tunnel). This is based on a “Metric Mass” family template. Make sure you create parameters for the superelevation, lane width and slope at the right and left of the road. As shown at 1:10 in this video, the values for the superelevation are recalculated within the family in order to handle positive and negative values.Section Profile family

After saving this family (“Concrete Deck Profile.rfa”), you load this one into a new family based on the “Metric Generic Model Adaptive.rft” template. You can change the behavior of this family in the Family Category & Parameters dialog. From there on we will use Dynamo to create the geometry.

Step 3 – Reading road data into Dynamo

Now we can start combining the information from step 1 and 2. This step starts at 2:11 in this video. The information about the road geometry can be read into Dynamo as a starter. The custom node “Road Splines from Excel” from the BIM4Struc.BridgeDesign package helps reading this Corridor Points report, by indicating the proper column indexes and Point Code descriptions (i.e. “RoadTopLeft”). If you choose to name these points differently in the Civil 3D model, then you need to change their descriptions as well in the Dynamo script.

In case the data changes in Civil 3D, you just need to regenerate the Corridor Points Report to Excel and rerun the script.
Road Splines from ExcelThe result of this operation are 4 3D Polycurves representing the road top edges (left, right and center) and also the projection of the centerline at level 0 m. These lines will be used later to calulate the superelevations (lane slopes) at specific intervals.

The ConversionMultiplier can be used to convert the units. By default it is set to 1000 to convert the metric “m” used in the Civil 3D model to “mm”, which is the unit used in the Revit project.

Note that within the custom node, the coordinates are reset to the internal Revit origin, this to avoid the geometry being positioned at geographic coordinates in a Family. To achieve that, the coordinates of the start point of the centerline are set to 0, while the other coordinates are recalculated relatively to that point. Afterwards this will make it easier to position the bridge deck family in the Revit project (i.e. based on the imported feature lines in Revit).

Reset geometry to Revit internal origin

Step 4 – Setting the bridge deck parameters in Dynamo

Before continuing with the geometry we need to setup the bridge parameters:

  • Bridge Alignment Variables:
    This group allows to add an offset and/or skew angle to the first and last profile of the bridge deck. These values are further on used to divide the alignment lines.
  • Bridge Superstructure Section Definition
    The configuration of this group depends on the way the “Concrete Deck Profile” family is created. In this optional part you can set the type parameters of the nested family, before it is placed.


Step 5 – Generating the bridge deck geometry with Dynamo

Starting at 3:25 in this video a second custom node is brought into the script. The node Bridge Section Profile Placement from the BIM4Struc.BridgeDesign package will place the initially created “Concrete Deck Profile” family at the right positions and orientation. The node is built in a way it doesn’t matter in which quadrant of a circle the planview of the bridge is positioned and orientated. It will adjust the profiles accordingly. Practically this means that the centerline points can have coordinates with syntaxis (-x,-y), (-x,y), (x,y) and (x,-y).
Bridge Section Profile Placement

This custom node needs the Polycurves from the road and the centerline at level 0 m as inputs. The ProfilePositionParameters port needs a list with values between 0 and 1 indicating the positions of the profile. The more elements in the list, the more accurate the curvature of the horizontal alignment. But don’t exaggerate as this influences the number of section profile instances placed in the family (and thus makes it heavier). Next you also connect the proper family type (Concrete Deck Profile.rfa in this case) to the Profile input port. And the skew angles at start and end can be indicated as well.

The outputs of this node return the ProfileInstances placed in the Revit family as well as the generated points on each road edge in Dynamo. The ProfileInstances are used in Step 7, when we need to integrate the calculated values from Step 6 into the Revit family.

Important to know is that in this step only the position and orientation of the section profiles are handled. The results of the generated points (bottom 3 output ports) are further used in Step 6 to define the individual section dimensions.

Step 6 – Calculate dimensions of each section profile

Now we know the coordinates and orientation of each division point on the road edges in Dynamo, we can calculate the values of the superelevation and thus also the width and slope of each road lane. This is shown starting from 4:26 in this video.
Deck Geometry DimensionsThe procedure to calculate doesn’t need to be changed as long as you use the ‘three edge method’ to detect the road geometry. If your section profile uses different parameters names for  the Lane Width and Lane Slope, then off course you need to change their references in the Dynamo script in the middle Code Block shown in the image above.

Step 7 – Modify profile instances and create geometry

The results of the parameter calculations in Step 6 are connected with the Element.SetParameterByName node, and this will make the proper changes to each individual section profile placed in the Revit family. The geometry of the section profile instances is send back to Dynamo (Element.Curves) and used to create the solid deck geometry by means of the Form.ByLoftCrossSections node. Starting at 4:50 in this video.

Geometry Creation in RevitI’ve decided not to group all these parameter calculation and solid creation nodes into a custom node, as it might happen that you use a different set of parameters, instances, … This way, the script is flexible for you to change if needed.

Step 8 – Flexible and modifiable family

The last section of this workflow (starting at 5:52 in this video) may be the most important one. After the Dynamo script has run and been closed, it is still possible to change the properties of the section profiles (in red) – which are by the way placed in a different subcategory for better visualization management in the project.

When you connect the instance parameters of the nested “Concrete Deck Profile” family with the family parameters of the main deck family, then you make it even possible to change the dimensions of the deck geometry from within the Revit project.


I think we all can agree that a concrete bridge deck geometry without reinforcement details added is like a pub without beer…

This part of the workflow will give you some insight in the possibilities that Dynamo offers to Revit when modelling complex rebar cages into the curved deck. There are many methods to achieve this, and there are also lots of varieties in the rebar shapes. The method described below is a generic usable one for the modelling of the transversal rebar cages, and is based on a “distribution along path” principle.
Computational Rebar ModellingThe results are shown in this video from the playlist. In the next steps, it is described how to get to this result.


The method used here needs the BIM4Struc.Rebar and Dynamo for Rebar packages to be installed in Dynamo.

The Dynamo script “07 Transversal Rebar Distribution.dyn” used for this, is included in the datasets at the bottom of this post.

Step 1 – Model a base set of reinforcement

Before you start it is necessary to have modelled a base set of transversal reinforcement in the bridge deck. This can be done with the out-of-the-box Revit tools. This base set has the right properties already. Optionally you can save the rebar objects in a Selection Set in Revit, in order to find it back easily after distribution and to delete it then. (See 0:17 on this video)

Step 2 – Import the base rebar geometry in Dynamo

This base set of rebar objects will be used to generate a distributed set of rebar. Therefore we need to read the original geometry of the rebar elements into Dynamo. This is done in the “Get Rebar sketch from Revit” group, by means of the Rebar.GetCenterlineCurve node (from the BIM4Struc.Rebar package). The node returns the sketch behind the 3D Rebar object in Revit. (Read the input port tooltips on the node for more information about the options). The resulting curves can now be used to be distributed within the deck geometry. In the same time the Revit ID of the object hosting the base rebar is read too, to use it further in the Rebar creation step.
Import rebar geometry
(From 0:25 on this video)

Step 3 – Define position and orientation of base rebar

This step is needed to detect the right orientation of the base rebar set and its relative position to the selected distribution path (Select Edge from Step 2). This information is crucial to make the distribution working. The position and orientation is represented then by the Curve.CoordinateSystemAtParameter nodeRebar position

Step 4 – Distribute the rebar sketch lines in Dynamo

The geometry from Step 2 combined with the position and orientation data from Step 3, results in a new list of geometry representing the equally distributed rebar sketch lines.

Rebar Distribution

Transversal Reinforcement in Dynamo

Step 5 – Create Rebar geometry in Revit

Finally (as seen at  0:59 on this video), the resulted curves are used to create the Rebar objects in Revit, with the Rebar.ByCurve node from the Dynamo for Rebar package To use the same properties for the newly created Rebar, the properties from the selected base set are read by the Rebar.GetProperties node from the BIM4Struc.Rebar package.

Rebar in Revit


The datasets below contain more scripts to create the longitudinal reinforcement i.e.

The described method above, together with some more “rebar awesomeness” will be presented and explained more in detail in this class at AU 2016 in Las Vegas, later this year.


The datasets used in this workflow can be downloaded here.

I hope you enjoyed reading and that this workflow may be of use for your daily work !

Join us and learn at Autodesk University 2016

Today the registration of Autodesk University 2016 opened up officially ! This year, AU is organized at The Venetian in Las Vegas, November 15-17, 2016. You can now sign up for AU 2016 and register for these classes below via this link.

This is the perfect time to share you some more details about the two classes I’m going to teach at #AU2016 !

ES15357 – Dynam(o)ite Your Rebar Design
Tuesday, Nov 15, 1:00 PM – 2:30 PM

In this class I will teach show you the value of Dynamo in the design of reinforced concrete models. You will learn to create complex rebar models in no time. And I will introduce you to the BIM4Struc.Rebar package. To tease you with some imagery:
Revit - Computational Rebar Distribution

CS21553 – Construction Dynam(o)ite—Explode Productivity with Dynamo
Wednesday, Nov 16, 1:00 PM – 2:30 PM

Another discipline which is very interesting and where Dynamo could help explode your productivity is “Construction”. In this class I will show all kinds of examples from basic to advanced workflows for construction validation. From model checking to optimization of crane positioning on site…
Lift Range Capacity - 09

The only advice I can give to you now is: go for it and register for these classes !

Or in case you’re not sure if you can go, at least put them in your favorites:


Watch the full list of classes being teached at AU 2016 over here.

Looking forward to meet you in one or all of my classes !


Rebar productivity tools for Revit with Dynamo

I finally started to gather all the custom nodes I have been creating for the creation of rebar objects in Revit using Dynamo. Besides using the Dynamo for Rebar package from CORE Studio, I also created some small productivity tools that can help you driving your rebar design. The package for Dynamo that has been published is called BIM4Struc.Rebar.

At this moment it consists of a limited number of custom nodes, but there will be added more and more, as AU gets nearer.

The ones that exist now in the package as a starter:


Rebar.GetHost returns the Revit ID of the host that contains the rebar object. In case that the rebar is not hosted, then it will be returned in the NonHostedRebar.

Rebar.GetCenterlineCurve is a node that returns the sketch geometry of a rebar, which is in fact the centerline. This is very handy when distributing existing complex rebars along 3D curves (using the Dynamo for Rebar package again).

Rebar.GetProperties is a node that extracts all necessary rebar properties from a selected rebar in Revit. These properties can be used in combination with the Dynamo for Rebar creation nodes to copy existing rebar for instance.

This helped me to make a quite short script to build the rebar in this double curved deck.

2016-06-17_12-13-27 2016-06-17_12-15-46 2016-06-17_12-18-10

There will be explained more on this in future blog posts !

See keep an eye on it !

Clearance Height on Stairs – Watch your head!

The ergonomics of a stair is not only about the tread depth, the riser height, the stair slope, … It is also about the safety of your head when you walk the stair. Ever been in a situation when you rushed down the stair to the cellar and then bumped your head against one of the floor beams 😉

In this post I will explain you how to create your own Dynamo script for the “Clearance Height Check” of your stairs in a Autodesk Revit project. The Dynamo script (which can be downloaded at the bottom of this post) works on a selected stair and will verify the “Clearance Height” or “Headroom” between the tread top surfaces and the objects above. The results will then be displayed as colored lines.


The script consists of 7 main parts, organized in node groups. Each of the steps is described below.

Step 1 – Input

In this step you need to select the stair that you want to analyze. This can be a single or a multi-story stair.
The Safety Offset parameter is explained in Step 3 further in this post.
And of course you need to set a constraint for the “Clearance Height” in the last parameter.

Step 2 – Detection of top surfaces of treads and landings

When you import the stair geometry into Dynamo, it’s considered as one single solid. This means you can’t detect the individual treads (with the native nodes). In this case we use the Element.Faces node to detect all the surfaces of the solid. Each of these surfaces has a normal vector (Surface.NormalAtParameter). The surfaces with a Z-value of this vector equal to 1, are the top horizontal surfaces of the stair. In this case these are the treads and landings, but also the smaller end surfaces of the supports or stringers. In the first List.FilterByBoolMask these top surfaces are filtered (results is in the in output). In the second List.FilterByBoolMask the surfaces with an area smaller than the tread area (= width * tread depth) are filtered out (the in output represents the surfaces with a greater or equal area).

Now we have the references of the treads and landings which represent the bottom of our “Clearance Height” calculation.

Step 3 – Detecting the upper elements with ray bouncing

This part of the script will generate the “calculation” elements by

  1. creating a point in the middle of each top surface (Surface.PointAtParameter)
  2. translating the points vertically with a distance equal to the indicated “Safety Offset”. This is done to avoid the point being inwards the solid of the tread. In a later step we will add this 50 mm value to the resulting clearance height.
  3. using the points as origins for the RayBounce.ByOriginDirection which will cast rays in an upward direction until it meets an object on it’s way. The output of this node consists of Points, which are the start- and endpoints of the single ray (maxBounces=1 and Elements which represent the family instances that are hit by the ray.
  4. connecting the start- and endpoints by means of the PolyCurve.ByPoints node.

These polycurves can now be used to calculate the headroom and visualize the results in the next steps.

Step 4 – Visualization of environment

In this optional step, the elements that are hitted by the rays are displayed within the Dynamo GUI. Play with the Number Slider to manage the transparency of the objects.

Step 5 – Check the Clearance Height

The smallest but nevertheless the most important part of the script checks the length of each designed polycurve (from Step 3) and adds the Safety Offset value (50 mm) to the result. The output is verified with the Minimal Clearance Height, indicated in the Input group. This results in list with “true” and “false” values which then will be used for filtering.

Step 6 – Creation of analysis samples in Revit

The polycurves, created in step 3 can now be used to create “Model Lines” in Revit, in order to visualize the possible problems with clearance heights. As the ModelCurve.ByCurve can not accept polycurves, we need to explode these in lines first. Graphically you can’t see any difference as the “unexploded” and the “exploded” version still show a two-point line. But the data type is different…

Optionally you change the style of the model lines, to have better representation and filtering capabilities in Revit. Therefore the Archi-lab / Grimshaw package offers the Get Line Style by Name node that loads a line style to Dynamo which is used to change the initially created line.

Step 7 – Visualization of the results

This last step will change the appearance of the lines created either in Dynamo either in Revit, depending on the Clearance Height requirements. If the length of the polycurve +50 mm, hence the real headroom, doesn’t meet the minimal clearance, then the line is colored in red, otherwise it is colored in green. This graphical result can help you to solve the problem with the surrounding elements and re-run the script to see the new results.


The Dynamo script and the Revit sample file (originally the rac_advanced_sample_project.rvt) can be downloaded here.