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.