Computational Design for Civil Engineers

Dynamo and Computational Design

Dynamo is a platform enabling designers to explore visual programming, solve problems, and create custom tools.

Visual programming in Dynamo to create a circle using nodes and connectors.
Dynamo is a platform for automation that supports customization.
Dynamo is the low-hanging fruit of the tree of automation tools.

Why Use Dynamo

Dynamo allows the designers to do more and control complex modeling that would be otherwise impossible or extremely difficult or time consuming to do manually with out-of-the-box functionalities of the host application.

CivilConnection and CivilPython

CivilConnection is the name of the Dynamo custom package for Dynamo for Revit that enables the Civil 3D — Dynamo — Revit technology stack for Autodesk Consulting engagements that have been known as “Linear Structures.” It enables the usage of a linear reference system defined in an open Civil 3D document (e.g., a corridor, alignment, feature line, etc.) to create and/or update elements in a Revit document. It also enables you to import and update the elements from a Revit document into a Civil 3D document.

CivilConnection and CivilPython dynamically connect Civil 3D and Revit via Dynamo.
Linear structure use cases enabled via CivilConnection and CivilPython.
CivilPython further extends the capabilities of CivilConnection.
Examples of static design for a road intersection or a truss.
Civil 3D offers parametric tools for civil workflows.
Concrete ties dynamically connected to a Civil 3D rail corridor via Dynamo.
Define a sequence of instructions via traditional scripting.
Dynamo as an environment for computational design.

Dynamo for Civil 3D

In Civil 3D 2020 it is possible to find an integration with Dynamo. Initially Dynamo for Civil 3D was available as a separate install accessible from the under the addons for Civil 3D 2020. With Civil 3D 2020.1, Dynamo comes directly with the product.

AutoCAD and Civil 3D Nodes

The aim of this section is not to list the nodes currently present in Dynamo for Civil 3D — that would be rather pointless as they can change quite a lot in between versions. It is more important to understand how the nodes are organized in the Dynamo library, what are the relationships between object types, and what are the current limitations.

Nodes structure for Dynamo for Civil 3D.

Dynamo Bindings

When the Dynamo application is visible and the graph creates objects in the DWG, the trace of the Dynamo owned objects can be serialized in the Dynamo file itself. This mechanism is called “Binding”: for each node that creates objects from Dynamo into the DWG, Dynamo stores their “fingerprints” in the Bindings section of the Dynamo JSON structure, so that if the inputs change, Dynamo can confidently update only the objects that are owned by the graph accordingly. The user needs to save the file after the execution for Dynamo to be able to store the trace data into the Bindings section.

Dynamo Standards

As soon as Dynamo allowed the creation of node groups and colors in 2015 (0.8.1) I developed a standard to unify the look and feel of Dynamo graphs. The standard is based on a very simple fact: every automation on a model, regardless of the language used, is a sequence of functional tasks. I’ve associated a color in the palette in Dynamo, from left to right like reading a book, for these sequences of logical functions.

Automated Workflows in Dynamo

At a very high level, a Dynamo graph can enable some form of the following workflows.

Extract Data from the Model

The automation reads the model objects data programmatically and then sends it to another application for consumption. To enable this workflow the automation should provide functionalities to:

  • Select objects, either directly or based on a property or classifier (e.g. select all the lines in a model)
  • Get properties, every objects in a host application is more than just an abstract piece of geometry and contains information such as handles/ids, type, and other kind of metadata associated (e.g. the length of a line, the color, the name of the layer etc.), the data needs to be extracted and interpreted (e.g. it is a piece of text, a number or another object, etc.)
  • Write the values to an external storage, this can take any form and requires managing the creation of data streams and serialization towards different formats (e.g. text, CSV, XLSX, XML, JSON, image formats, etc.) An example of this workflow could be extracting the elevation of feature lines at given station intervals and write the resulting information to a custom report in Excel.
Visual representation of the automation to extract data to Excel.

Modify Existing Objects with External Data

The automation reads the external data, accesses the model objects properties, updates the values, and saves the changes to the database (e.g. the location of Cogo Points, the starting station of an alignment, etc.). To enable this workflow the automation should provide functionalities to:

  • Select objects, either directly or based on a property or classifier (e.g. select all the lines in a model)
  • Read an external source or input, for example a numeric value specified by the user or the location of the external source (e.g. server, cloud-based repository, etc.); the automation should be able to interpret the data contained in the source/input and return the values in the automation environment for further processing.
  • Modify objects. The automation should be able to open a transaction with the host application, find the properties that needs to be modified as the user intended (metadata and non) assign the new value, and commit the changes to the model database.
Logic for editing property sets values from Excel.

Create or Update Objects

The automation receives some inputs, processes the data following the computational rules, and creates objects in the host application model. If the inputs change, executing the automation one more time updates the definition of the elements previously created they are new or update their definition if there are any existing objects connected to a previous execution of the automation. To enable this workflow the automation should provide functionalities to:

  • Acquire user inputs, either directly or from an external source.
  • Process data define the logical steps to transform the inputs into abstract Dynamo geometry items that can be used to drive the creation of model objects.
  • Create/update model objects, a set of functionalities that can transform a Dynamo abstract object into a concrete model object for the host application. An example of this workflow could be creating bollards along the side of a road.
Logic to create bollards along the side of a road.

Computational Design for Civil Workflows

The webinar referenced above briefly discussed some use cases to demonstrate design automation applications of Dynamo for Civil 3D in three different areas: Rail, Roads, and Site Development. The scope in this article is to provide some context and highlight the logic behind the graphs that were used during the webinar and point out the Dynamo for Civil 3D functionalities used to obtain the results. The approach used in this document explains the goal and the logic used to reach it, the object types involved and how to find the relationships that keep the logic together using Dynamo nodes.


With Civil 3D 2020 there are many improvements to support rail workflows. A complete list of these improvements can be found on the Civil 3D online help under the Release Notes. When it comes to automation it is always useful to identify the components of the tasks in relation to their outcomes such as Do More, Do it Better, or Do it with Less Effort.

Concrete Ties

The key learnings for this example are:

  • How to get a Corridor Feature Line from the document
  • How to get a Coordinate System on a Corridor Feature Line
  • How to create a range of stations
  • How to create Block References
Logic for the concrete ties.
Selecting the definition of a Block Reference in the document by name.
Create a block reference with a coordinate system.
Getting a coordinate system on a feature line by station.
Get a feature line from a corridor via its point code.
Calculate a range of stations to retrieve coordinate systems on the feature line.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Autodesk University

Autodesk University

Learn, connect, explore. The official account for Autodesk University.