ImageGear .NET v25.0 - Updated
Load a CAD File
User Guide > How to Work with... > CAD > How To ... > Load a CAD File
This section provides information about the following:

Loading a CAD file

The following sample code demonstrates how to load a CAD file using ImageGear.

C#
Copy Code
using System.IO;
using ImageGear.Formats;
using ImageGear.Formats.CAD;

public static void LoadACadFile(string path)
{
    ImGearCADPage page = null;

    // Load the file.
    using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
    {
        page = (ImGearCADPage)ImGearFileFormats.LoadPage(fileStream);
    }
}
VBV.NET
Copy Code
Imports System.IO
Imports ImageGear.Formats
Imports ImageGear.Formats.CAD

Public Sub LoadACadFile(path As String)
    Dim page As ImGearCADPage

    ' Load the file.
    Using fileStream As New FileStream(path, FileMode.Open, FileAccess.Read)
        page = ImGearFileFormats.LoadPage(fileStream)
    End Using
End Sub

Saving a CAD File as Other Supported Formats

See Convert ... for more information.