<?xml encoding=”UTF-8″>By Madhukar Moogala
Developing AutoCAD and Civil 3D add-ins requires setting up boilerplate code, managing dependencies, and ensuring compatibility with the latest .NET versions. To simplify this process, we created a .NET Core-based project template that allows developers to quickly scaffold AutoCAD and Civil 3D add-ins using a single CLI instruction.
How to Use the Template
set "AcadDir=C:Program FilesAutodeskAutoCAD 2025"
dotnet new civil --rootNamespace=CivilCmd -o TestCivilProject
cd TestCivilProject
dotnet restore
dotnet build
This command generates a Civil 3D add-in project with the specified root namespace and output directory.
What’s Inside the Template?
- A pre-configured .csproj file targeting .NET Core/.NET 8.0 for AutoCAD 2025+ compatibility.
- An implementation of IExtensionApplication for AutoCAD commands.
- A sample command class with a simple Civil 3D API example.
Extending the Template
The template is designed to be easily extensible. You can add new commands, implement new interfaces, and reference
external libraries as needed. The template also includes a sample command class that demonstrates how to interact
with the Civil 3D API.
- Additional dependencies (e.g., Newtonsoft.Json, AutoCAD NuGet packages).
- Unit tests using xUnit or NUnit.
- Logging mechanisms like Serilog.

Leave a Reply