Beheren van OLE-objecten
Contents
[
Hide
]Object Linking and Embedding (OLE) is een Microsoft Windows-functie waarmee je informatie van de ene applicatie naar de andere kunt kopiëren of verplaatsen, terwijl je de mogelijkheid behoudt om de informatie in de oorspronkelijke applicatie te bewerken. In wezen combineert OLE gegevens van verschillende applicaties in één document. Om OLE te gebruiken, heb je zowel bron- als bestemmingsapplicaties nodig die OLE ondersteunen.
Exporteren van ingesloten OLE-objecten
Aspose.CAD voor .NET ondersteunt nu het exporteren van ingesloten OLE-objecten vanuit DWG-indeling. Dit artikel demonstreert hoe je ingesloten OLE-objecten van DWG-indeling naar PNG kunt exporteren met Aspose.CAD.
De voorbeeldcode hieronder toont hoe je deze functie kunt bereiken.
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); | |
} | |
} |