Konvertieren Sie eine Visio-Form in ein SVG-Format
Contents
[
Hide
]
** Konvertieren Sie eine visio-Form in SVG**
Die ToSvg-Methode, die von derForm Klasse kann zum Konvertieren in SVG verwendet werden.
Der folgende Code zeigt, wie man:
- Laden Sie eine Probe diagram.
- eine bestimmte Seite bekommen.
- eine bestimmte Form bekommen.
- Konvertieren Sie die Form in SVG.
Form zu Svg
Verwenden Sie den folgenden Code in Ihrer .net-Anwendung, um eine visio-Form in SVG zu konvertieren.
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
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_Shapes(); | |
// Call a Diagram class constructor to load the VSDX diagram | |
Diagram diagram = new Diagram(dataDir + "ShapeToSvg.vsdx"); | |
// Get a particular page | |
Page page = diagram.Pages[0]; | |
// Get a particular shape | |
Shape shape = page.Shapes[0]; | |
SVGSaveOptions svgOptions = new SVGSaveOptions(); | |
// Shape to Svg | |
shape.ToSvg("out.svg",svgOptions); |