Help placing blocks along a polyline using Dynamo for Civil 3D

Hi everyone :waving_hand:

I’m new to Dynamo for Civil 3D (version 2026), and I’m trying to do something that seems simple, but I can’t get it to work :sweat_smile:.
I want to place blocks (like barriers, signs, delineators, poles, etc.) along a polyline or 3D polyline, spaced at a specific distance (for example, every 4 meters).

I’m using Dynamo Core 3.5.2, and I managed to build part of the workflow, but I’m getting confused with some of the nodes.

unless you want to do something fancy- don’t need Dynamo for this.

The DIVIDE and MEASURE AutoCAD commands will place a block along a polyline, optionally aligned with the polyline. So in your case- MEASURE would place blocks a 4m spacing

Do do the same in Dynamo is quite straightforward- give it a try and post the Dynamo graph if you get stuck. You’ll need to convert the C3D polyline geometry into Dynamo curves

I have created similar script for road barriers, that consists of two parts:

1. To create barrier posts (or just put separate blocks along polyline)

· Select polyline

· Select surface

· Define post interval (for example 4m),

· Get polyline length (for example 40m),

· Get the stations for each post (0, 4, 8…40) by Measure/Divide

· Next, I used following nodes:

o Curve.PointAtSegmentLength

o Document.BlockByName

o BlockReference.Create (to place the blocks in DWG)

2. To create guardrail face (the barrier itself)

· Curve.CoordinateSystemAtSegmentLength (use the same polyline as for the posts, segment Length is calculated before in the step Measure the stations for each post

· Get rotation along the new coordinate system

· Create polycurve to represent the cross section of the guardrail

· I recreated the Dynamo polycurve from polyline, just added an X amount to Z value to raise it up.

· Curve.CoordinateSystemAtSegmentLength (for the new polycurve)

· Surface.BySweep;

· Surface.Thicken;

· Object.ByGeometry

2 Likes

Welcome to the world (and rabbit hole) of Dynamo :slight_smile: and welcome to the forum!

Maybe you already have read it but if not, here is a link to the Dynamo Primer which is a very good start https://primer2.dynamobim.org/
What have you tried to create so far? The forum is very good and the community is eager to help out but you will learn so much more if you are able to share some of your work first and then it be easier to help you out.

1 Like

Thank you, @Andres_Anell, for your quick reply,
and sorry for the late appreciation

As you mentioned, there are several ways to do this directly in AutoCAD.
For example, using a multi-view block you can place it along a polyline, line, or other element at the desired pillar spacing or interval.

However, since I’m still quite new to Dynamo wanted to see if I could automate this task.
It looks simple at first… but once you dive in, it’s not that easy!
Still, I thought it was a great way to practice and understand how to convert Civil 3D polylines into usable curves inside Dynamo.

Thank you, Andres_Anell, for your quick reply,
and sorry for the late appreciation

As you mentioned, there are several ways to do this directly in AutoCAD.
For example, using a multi-view block, you can place it along a polyline, line, or other element at the desired pillar spacing or interval.

However, since I’m still quite new to Dynamo, I wanted to see if I could automate this task
It looks simple at first… but once you dive in, it’s not that easy!
Still, I thought it was a great way to practice and understand how to convert Civil 3D polylines into usable curves inside Dynamo.

Thank you very much, @LasmaDzintare, for sharing your knowledge!
I’m trying to do the whole process using a multi-view block, but I can’t get it to work yet :sweat_smile:

I have a quick question — does your script work within the same Dynamo graph (file) for both parts (the posts and the railing surface)?
Or did you create two separate graphs — one for placing the posts and another for generating the railing face?

Hi, I put them in the same script to make it easier - selecting inputs just once not twice

Hola amigo @geofran26 buenas. Welcome to the comunity, have you checked previous post related to what you want to do?

if you are beginer i strongly sugest begin reading dynamo premier and start to learn little by little, i let you a couple related topics, hope it helps you, good luck!!

2 Likes