DXF/DWG/DWT File Processor for .NET

Introduction to DXF/DWG/DWT File Processor for .NET

The DXF/DWG/DWT File Processor for .NET is a powerful API that allows developers to work with AutoCAD files in their .NET applications. This guide will walk you through the available features and provide code examples to get you started.

Loading and Saving Files

To load a DXF, DWG, or DWT file, you can use the Image class. Here is an example of how to load a file:

using Aspose.CAD;

using (Image image = Image.Load("example.dxf"))
{
    // Work with the loaded image
}

To save a file, you can use the Save method:

using (Image image = Image.Load("example.dxf"))
{
    // Modify the image
    image.Save();
}

Viewing and Exporting Files

The API provides several options for viewing and exporting files. You can export a file to PDF:

using  Aspose.CAD;
using  Aspose.CAD.ImageOptions;

using (Image image = Image.Load("example.dxf"))
{
    PdfOptions opt = new PdfOptions();
    opt.CorePdfOptions = PdfDocumentOptions();
    opt.CorePdfOptions.Compliance = PdfCompliance.PdfA1a;
    image.Save("output.pdf", opt);
}
 English