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 examples check.
For more information visit the 🚧 wiki 🚧 .
Before building run:
git submodule update --init --recursive
This command will clone the submodules. These are Shared Projects that this project dependes on.
Please feel free to fork this repo and send a pull request if you want to contribute to this project.
Notice that this project is in an alpha version, not all the features are implemented and there can be bugs due to this so any PR with a bug fix will not have a priority.
If you want to contribute you can check the Dxf documentation here.
This project is licensed under the MIT License - see the LICENSE file for details