Corridor in Dynamo

I have around 500 alignments in Civil 3D, and I want to automate the entire workflow using Dynamo and Python scripting.

For each alignment, I want Dynamo to automatically create:

  • Corridors

  • Corridor Surfaces

  • Sample Line Groups

  • Sample Lines

  • Section View Groups

  • Volume Tables / Quantity Takeoff

I am coding everything directly in Dynamo.

I can successfully create the corridors, corridor surfaces, sample line groups, and sample lines.

However, the problem starts after creating the Sample Line Groups.

The Sample Line Groups cannot recognize the corridor surfaces and other surfaces as section sources automatically. Because of this, the Section Views are created without any section data, and the elevations remain zero.

If I manually open “Sample More Sources” in Civil 3D and select the corridor and surfaces, everything works correctly immediately.

So the issue is not with the corridor or surfaces themselves. The issue is that Dynamo/API is not attaching them as section sources.

I also could not find any Dynamo node for assigning section sources to a Sample Line Group.

My question is:

How can I programmatically assign corridor surfaces and surfaces as section sources for Sample Line Groups using Dynamo/Python/API in Civil 3D?

Has anyone successfully automated this workflow completely?

Any help, API examples, or recommended workflow would be greatly appreciated.

I encountered the same issue using Civil 3D 2025 and could not find a solution with built-in nodes or other major packages. As a result, Two nodes were developed SampleLineAddSurface and SectionViewBySampleLine and I have recently published them in a package called Cadence. This package is still a work in progress and it is my first time developing and publishing nodes, so please use them with caution, care, love, etc. :grin:

I am using these nodes in a workflow similar to the one below, which also uses nodes from the Camber package.

C3D_AddSurfaceToSampleLines_CreateSectionViews.dyn (329.7 KB)

Thanks for your reply. I really appreciate it. I will definitely try this approach.:raising_hands: