Adding railway sleepers in Civil 3D

Corridors can be used in Civil 3D to design linear elements like roads, railway lines or retaining walls.



The assembly will be extruded along the baseline of the corridor to generate the object, which is what is required in most situations. However, sometimes we can have discrete elements in the assembly that need to be inserted at a certain interval along the baseline, rather than added as a constant extrusion. This is what happens with railway sleepers, also known as railroad ties or crossties.

A possible approach can be to use a conditional subassembly and apply a different assembly to the corridor based on the presence or absence of a polyline along the baseline of the corridor. In this example, we will be using Dynamo to automate the creation of those polylines, that will then be applied to the corridor as a target of the conditional subassembly.

To create the assembly, we start by inserting the ‘ConditionalHorizontalTarget’ subassembly directly in the baseline of the assembly. It needs to be inserted twice, once with the ‘Type’ parameter set to ‘Target Not Found’ and again with ‘Target Found’.
 
To illustrate this workflow, we will use the ‘Internal_Multi_Track’ subassembly. Omit the tie when the target is not found and include it when it is found.
 
The resulting assembly is shown below. Note how the railroad tie only displays when the target is found.

Our next task is to draw some polylines along the baseline of the corridor where the sleepers should go. The following steps will guide you through the creation of a Dynamo script to achieve this goal.

Select the corresponding baseline from the corridor.

Using this baseline, the following group will generate a list with the start and end chainages for all the polylines. The width and spacing of the tie are provided as an input and the resulting chainages will be centred around the baseline ensuring that no ties go beyond the start or the end chainages of the baseline.


Extract the start and end points of the polylines from the baseline using the list of chainages that we calculated previously. Those points will then be used to insert the polylines in the drawing in a layer of our choosing.

To finish the script, we check the ‘Is Input’ property for all the input nodes to enable the script to be executed from Dynamo Player.

Execute the Dynamo script adjusting the inputs accordingly.
 
After executing the script, you will see some polylines along the specified baseline with a length equal to the ‘Tie Width’ and a distance between them based on the ‘Tie Spacing’ provided. These polylines indicate where the sleepers should be placed.

There just remains to apply those polylines as targets of the conditional subassemblies in the corridor. Since all of those polylines have been created in the same layer, all of them can be easily selected at once.

The resulting corridor can be seen below, with the sleepers shown in red. The ballast reaches the top level of the sleeper in the gaps between them.

If you would like to improve your Civil 3D and Dynamo skills, you can have a look at our courses here.

Alternatively, our Civil Engineering consultancy services can be found here.


CAD and PLM: Why It’s the Solution for Manufacturing and Engineering Companies

29 July 2025

Efficiency, accuracy, and innovation are crucial for staying competitive in the industrial landscape of today. Manufacturing and engineering companies face increasing challenges in managing product development, ensuring design accuracy, and optimising workflows. That’s where Computer-Aided Design (CAD) and Product Lifecycle Management (PLM) come into play.

PLM Implementation Best Practices

29 July 2025

Implementing a Product Lifecycle Management (PLM) system can be transformative for any manufacturing or engineering organization, but success doesn’t happen by chance. It takes careful planning, collaboration, and the right tools. In this article, we’ll walk you through what PLM implementation involves, why it’s critical to your organization, the benefits it delivers, and the best practices to follow. We’ll also touch on common challenges to avoid, expected timelines, and how Sovelia Core can support your implementation journey.

PLM vs ERP: What's the Difference?

29 July 2025

Manufacturing companies today need robust systems to manage their operations and product development efficiently. Two of the most important systems in this regard are Enterprise Resource Planning (ERP) and Product Lifecycle Management (PLM). While they serve different purposes, both play a crucial role in streamlining business processes, improving collaboration, and enhancing overall productivity.