OLE 객체 관리

임베디드 OLE 객체 내보내기

Aspose.CAD for .NET은 이제 DWG 형식에서 임베디드 OLE 객체를 내보내는 것을 지원합니다. 이 문서에서는 Aspose.CAD를 사용하여 DWG 형식에서 PNG로 임베디드 OLE 객체를 내보내는 방법을 보여줍니다.

이 기능을 달성하기 위한 샘플 코드는 아래에 제공됩니다.

// 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);
}
}