مدیریت اشیاء OLE

صادرات اشیاء OLE جاسازی شده

Aspose.CAD برای .NET اکنون از صادرات اشیاء OLE جاسازی شده از فرمت DWG پشتیبانی می‌کند. این مقاله نشان می‌دهد که چگونه می‌توانید اشیاء OLE جاسازی شده را از فرمت DWG به PNG با استفاده از Aspose.CAD صادر کنید.

کد نمونه زیر برای دستیابی به این ویژگی ارائه شده است.

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