HTML JPG CAD XML DGN
  Product Family
BMP

C#を介してDGNをBMPに変換します

AutoCAD®やその他のレンダリングソフトウェアを必要とせずに、DGNをBMPに即座に変換します。

DGNをBMPに変換するために、機能が豊富で強力な Aspose.CAD for .NETAPIを使用します。 C#プラットフォーム用の使いやすいドキュメント操作および変換API。 NuGet パッケージマネージャーを開き、Aspose.CADを検索してインストールします。パッケージマネージャーコンソールから次のコマンドを使用することもできます。

パッケージマネージャーコンソールコマンド


PM> Install-Package Aspose.CAD

C#を介してDGNをBMPに変換する手順

  1. Image.Loadメソッドを使用してDGNファイルをロードします
  2. ページの高さと幅でCadRasterizationOptionsのオブジェクトを設定します
  3. BmpOptionsクラスのインスタンスを作成し、そのVectorRasterizationOptionsプロパティを設定します
  4. BmpOptionsの結果のファイルパスとオブジェクトを渡しながら、Image.Saveメソッドを呼び出します

変換要件

-Microsoft Windows、または.NET Framework、.NET Core、およびCOM相互運用機能を介したPHP、VBScript、Delphi、C++との互換性のあるOS。 -MicrosoftVisualStudioのような開発環境。 -プロジェクトで参照されているAspose.CADfor.NETDLL。

 

このサンプルコードは、DGNからBMPへのC#変換を示しています

// load DGN in an instance of Image via its Load method
using (var image = Image.Load("template.dgn"))
{
// create an instance of CadRasterizationOptions and set page height & width
var rasterizationOptions = new ImageOptions.CadRasterizationOptions()
{
PageWidth = 1600,
PageHeight = 1600
};
// create an instance of BmpOptions
var options = new ImageOptions.BmpOptions();
// set the VectorRasterizationOptions property as CadRasterizationOptions
options.VectorRasterizationOptions = rasterizationOptions;
// export DGN to BMP
image.Save("output.bmp", options);
}
 

DGNをBMPに変換する無料アプリ

Check our live demos for DGN to BMP conversion with following benefits.

  No need to download or setup anything.
  No need to write any code.
  Just upload your DGN file and hit the "Convert" button.
  You will instantly get the download link for resultant BMP file.