The automation toolbox
Civil 3D sits on top of AutoCAD, so it inherits all of AutoCAD's automation options and adds its own. The main choices are:
- Civil 3D .NET API – the most capable option. C# or VB.NET plugins can read and create alignments, profiles, surfaces, corridors, pipe networks, sample lines, labels and styles.
- AutoCAD .NET API – for general drawing work around the civil objects: layers, blocks, layouts, plotting and external references.
- Dynamo for Civil 3D – visual scripting, good for design-side tasks such as placing objects along corridors, without compiling code.
- AutoLISP and scripts – quick, lightweight automation of AutoCAD commands, with limited access to civil objects.
What can be automated
| Area | Typical automation | Best tool |
|---|---|---|
| Alignments & profiles | Create from polylines or survey data, apply design criteria, report stations and geometry | .NET API |
| Surfaces | Build from points and breaklines, add boundaries, compare surfaces, export volumes | .NET API |
| Corridors | Assign assemblies and targets, rebuild, extract feature lines and solids | .NET API, Dynamo |
| Pipe & pressure networks | Lay out networks from rules, size parts, check cover and clashes | .NET API |
| Sections | Create sample lines, section views and volume reports | .NET API |
| Labels & styles | Apply company label sets, fix style drift, audit templates | .NET API |
| Sheets | Plan and profile sheets, title blocks, sheet sets and PDF export | .NET API, AutoCAD API |
| Quantities | Pay items, material volumes and export to Excel or estimating | .NET API |
| Data exchange | LandXML, IFC, GIS and database exchange | .NET API, AutoCAD API |
A small example
This C# snippet lists every alignment in the drawing with its length. Real plugins build on the same pattern: get the Civil document, open objects in a transaction, read or change them, and commit.
CivilDocument civDoc = CivilApplication.ActiveDocument;
Database db = HostApplicationServices.WorkingDatabase;
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
using (Transaction tr = db.TransactionManager.StartTransaction())
{
foreach (ObjectId id in civDoc.GetAlignmentIds())
{
Alignment al = (Alignment)tr.GetObject(id, OpenMode.ForRead);
ed.WriteMessage($"\n{al.Name}: {al.Length:F2}");
}
tr.Commit();
}
Drawing production
Sheet production is often where the biggest time savings are. A plugin can create plan and profile sheets along an alignment, fill title blocks from project data, apply viewport scales, check that every sheet has the right labels, and publish PDFs in one run. See Civil 3D drawing automation.
Connecting Civil 3D with other systems
Civil 3D data is valuable outside the drawing: quantities for estimating, asset data for GIS, and model data for BIM coordination. The API can export structured data to databases, Excel or web services, and import survey or design data back. See Civil 3D data integration.
Where to start
List the tasks your team repeats on every project, estimate the hours each takes, and start with the one that is most rule-based. Labelling standards, sheet creation and quantity reports are common first projects because the rules are clear and the savings are easy to measure.
If your team can write down the rules, Civil 3D can usually follow them automatically.
Civil 3D automation services
See our Civil 3D customisation and automation and Civil 3D API and plugin development services, and read AutoCAD .NET API development.