การจัดการวัตถุ OLE
Contents
[
Hide
]Object Linking and Embedding (OLE) เป็นคุณสมบัติใน Microsoft Windows ที่อนุญาตให้คุณคัดลอกหรือย้ายข้อมูลจากแอปพลิเคชันหนึ่งไปยังอีกแอปพลิเคชันหนึ่ง ในขณะที่คุณยังคงสามารถแก้ไขข้อมูลในแอปพลิเคชันต้นฉบับได้ โดยพื้นฐานแล้ว OLE รวมข้อมูลจากแอปพลิเคชันที่แตกต่างกันเข้าไว้ในเอกสารเดียว สำหรับการใช้ OLE คุณต้องมีทั้งแอปพลิเคชันต้นทางและปลายทางที่รองรับ OLE
การส่งออกวัตถุ OLE ที่ฝังอยู่
Aspose.CAD สำหรับ .NET สนับสนุนการส่งออกวัตถุ OLE ที่ฝังอยู่จากรูปแบบ DWG แล้ว บทความนี้จะแสดงให้เห็นว่าคุณสามารถส่งออกวัตถุ OLE ที่ฝังอยู่จากรูปแบบ DWG ไปยัง PNG โดยใช้ Aspose.CAD ได้อย่างไร
โค้ดตัวอย่างมีดังต่อไปนี้เพื่อให้บรรลุฟีเจอร์นี้
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); | |
} | |
} |