using System.IO;
using ImageGear.Formats;
using ImageGear.Formats.CAD;
publicstaticvoid 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