SF

AutoCAD .NET API · .NET 8 · Civil engineering

Automating hydraulic structure design inside AutoCAD

A .NET 8 plugin generating culverts and technical sheets from an alignment and a surface, hydraulic calculations included.

Designing a culvert — the structure that carries water under a road — is repetitive work. The engineer reads an alignment and a surface from the model, computes the geometry, checks hydraulic behaviour, then transfers everything onto a drawing and a technical sheet. The same sequence, dozens of times per road project.

The plugin reads the alignment and surface straight from the drawing through the AutoCAD .NET API, derives the structure's geometry, runs the geometric and hydraulic calculations, then generates the 3D model and the matching technical sheet. What used to take a working session becomes a command.

The most instructive part of the project is not the code: it is the line between what a plugin should compute and what it should delegate. Hydraulic results are exported automatically to HY-8, the US FHWA's reference software, which acts as the verification authority. The plugin does not claim to replace a reference tool — it feeds it clean data and reads back its verdict.

Working with the AutoCAD .NET API imposes constraints web work never raises. The plugin runs inside AutoCAD's process, so an unhandled exception does not fail a request: it takes down the user's session, along with their unsaved work. Transactions against the drawing database must be opened and closed with the same discipline as a SQL transaction.

It is also a useful reminder for a web-oriented profile: the business does not always live in a REST API. Some industries have worked inside a desktop application for thirty years, and the value you add there is measured in engineer-hours freed, not milliseconds of latency.

.NET 8 · AutoCAD .NET API · C# · HY-8 (FHWA)

Related case study

Solo SaaS: from Payload CMS to a real client

Read next

Protecting desktop software: hardware fingerprinting and heartbeatCrossing five .NET versions without rewriting the application