OLEオブジェクトの管理
Contents
[
Hide
]オブジェクトリンクと埋め込み(OLE)は、Microsoft Windowsの機能であり、情報を別のアプリケーションにコピーまたは移動しながら、元のアプリケーションで情報を編集する能力を保持できるようにします。基本的に、OLEは異なるアプリケーションからのデータを1つのドキュメントに統合します。OLEを使用するには、OLEをサポートするソースおよび宛先アプリケーションの両方が必要です。
埋め込まれたOLEオブジェクトのエクスポート
Aspose.CAD for .NETは、DWG形式から埋め込まれたOLEオブジェクトをエクスポートすることをサポートするようになりました。この文書では、Aspose.CADを使用してDWG形式からPNGへの埋め込まれたOLEオブジェクトのエクスポート方法を示します。
この機能を達成するためのサンプルコードは以下に示されています。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The path to the documents directory. | |
string MyDir = RunExamples.GetDataDir_DWGDrawings(); | |
string[] files = new string[] { "D ZD junior D10m H2m.dwg", "ZD - Senior D6m H2m45.dwg" }; | |
PngOptions pngOptions = new PngOptions { }; | |
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions(); | |
pngOptions.VectorRasterizationOptions = rasterizationOptions; | |
rasterizationOptions.Layouts = new string[] { "Layout1" }; | |
foreach (string file in files) | |
{ | |
using (CadImage cadImage = (CadImage)Image.Load(MyDir + file)) | |
{ | |
cadImage.Save(MyDir + file + "_out.png", pngOptions); | |
} | |
} |