DomCR / ACadSharp

C# library to read/write cad files like dxf/dwg.
MIT License
429 stars 119 forks source link
cad dwg dwg-files dwg-reader dwg-writer dxf dxf-files dxf-reader dxf-writer

ACadSharp Build&Test License nuget Coverage Status

C# library to read/write cad files like dxf/dwg.

Features

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:

For pdf export check :construction: ACadSharp.Pdf :construction:.

Compatible Dwg/Dxf versions:

DxfReader DxfWriter DwgReader DwgWriter
AC1009 :x: :x: :x: :x:
AC1012 :heavy_check_mark: :heavy_check_mark: :x: :x:
AC1014 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
AC1015 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
AC1018 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
AC1021 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :x:
AC1024 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
AC1027 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :x:
AC1032 :heavy_check_mark: :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:

Code Example

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 :construction: wiki :construction: .

Building

Before building run:

git submodule update --init --recursive

This command will clone the submodules. These are Shared Projects that this project dependes on.

Contributing

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.

License

This project is licensed under the MIT License - see the LICENSE file for details