C# library to read/write cad files like dxf/dwg.
ACadSharp allows to read or create CAD files using .Net and also extract or modify existing content in the files, the main features may be listed as:
- Read/Write Dxf binary files
- Read/Write Dxf ASCII files
- Read Dwg files
- Write Dwg files
- Extract/Modify the geometric information from the different entities in the model
- Control over the table elements like Blocks, Layers and Styles, allows you to read, create or modify the different tables
For pdf export check π§ ACadSharp.Pdf π§.
| DxfReader | DxfWriter | DwgReader | DwgWriter | |
|---|---|---|---|---|
| AC1009 | βοΈ | β | β | β |
| AC1012 | βοΈ | βοΈ | β | β |
| AC1014 | βοΈ | βοΈ | βοΈ | βοΈ |
| AC1015 | βοΈ | βοΈ | βοΈ | βοΈ |
| AC1018 | βοΈ | βοΈ | βοΈ | βοΈ |
| AC1021 | βοΈ | βοΈ | βοΈ | β |
| AC1024 | βοΈ | βοΈ | βοΈ | βοΈ |
| AC1027 | βοΈ | βοΈ | βοΈ | βοΈ |
| AC1032 | βοΈ | βοΈ | βοΈ | βοΈ |
public static void Main()
{
string path = "sample.dwg";
CadDocument doc = DwgReader.Read(path, onNotification);
}
// Process a notification form the reader
private static void onNotification(object sender, NotificationEventArgs e)
{
Console.WriteLine(e.Message);
}For more code examples check.
Visit the π§ wiki π§ for the API specification of the library.
Check the documentation for specific information about some use cases.
Before building run:
git submodule update --init --recursiveThis command will clone the submodules necessary to build the project.