Hello World 示例
Contents
[
Hide
]
Hello World 示例
Aspose.Diagram for .NET has rich features to create, open, edit and convert Microsoft Visio files using C# and other .NET languages. It supports a wide set of Visio file formats including VSDX, VDX, VSD, VSX, VTX, VSSX, VSDM, VSSM, VSTM, VDW, VSS, and VST. In addition, it provides the capability to convert Visio Diagrams to a number of formats such as PDF, HTML, XML, SVG, and XAML.
后安装 Aspose.Diagram for .NET在您的环境中,可以使用以下步骤查看 Aspose.Diagram API 在 .NET 应用程序中的使用情况。
- 实例化一个 Diagram 对象
- 使用Diagram类对象的Save方法将文件保存到光盘
The following code snippet is a Hello World program to exhibit the working of Aspose.Diagram for .NET API.
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_LoadSaveConvert(); | |
// Initialize a Diagram class | |
Diagram diagram = new Diagram(); | |
// Save diagram in the VSDX format | |
diagram.Save(dataDir + "CreateNewVisio_out.vsdx", SaveFileFormat.VSDX); |