HTML JPG PDF XML DGN
Aspose.CAD  for .NET
DGN

DGN File Viewer for .NET

View DGN as an image without needing AutoCAD or any other rendering software.

How to View DGN File Using C#

In order to view DGN file, we’ll use

Aspose.CAD for .NET

API which is a feature-rich, powerful and easy to use API for C# platform to be used with any Viewer. Open

NuGet

package manager, search for Aspose.CAD and install. You may also use the following command from the Package Manager Console.

Package Manager Console Command


PM> Install-Package Aspose.CAD

Steps to View DGN via C#

Aspose.CAD makes it easy for the developers to view the DGN file with just few lines of code.

  1. Load DGN file with Image.Load method
  2. Set an object of CadRasterizationOptions with page height & width
  3. Create an instance of TiffOptions class and set its VectorRasterizationOptions property
  4. Call Image.Save method with object of TiffOptions
  5. Call Process.Start with path to resultant image to load it in default application

System Requirements

Aspose.CAD for .NET is supported on all major operating systems. Just make sure that you have the following prerequisites.

  • Microsoft Windows or a compatible OS with .NET Framework, .NET Core
  • Development environment like Microsoft Visual Studio
  • Aspose.CAD for .NET referenced in your project
 

C# code to view DGN

 
  • About Aspose.CAD for .NET API

    Aspose.CAD is an AutoCAD conversion API. One can easily convert DWG, DWF, DGN and DXF documents to PDF, TIFF, JPEG, PNG and other image formats. Moreover, API provides conversion facility of specific layouts and layers from the AutoCAD documents. Its a standalone API and does not require AutoCAD or any other software installation.

    Free App to View DGN

    Other Supported Viewer Formats

    Using C#, One can also view many other file formats including.

    DWF (Design Web Format DWF)
    DWG (Proprietary binary files)
    DXF (Drawing Interchange Format)
    IFC (Industry Foundation Classes IFC file format)
    STL (Interchangeable 3D Surface Geometry)