Your First Aspose.Diagram Application - Hello World
Contents
[
Hide
]
This beginner’s topic shows how developers can create a simple first application (Hello World) using Aspose.Diagram' simple API. The application creates a Microsoft Visio file with the words Hello World in the page.
Creating the Hello World Application
To create the Hello World application using Aspose.Diagram API:
- Create an instance of the Workbook class.
- Apply the license:
- If you have purchased a license, then use the license in your application to get access to Aspose.Diagram' full functionality
- If you are using the evaluation version of the component (if you’re using Aspose.Diagram without a license), skip this step.
- Create a new Microsoft Visio file, or open an existing file in which you want to add/update some text.
- Insert the words Hello World! into the page accessed.
- Generate the modified Microsoft Visio file.
The examples below demonstrate the above steps.
Creating a Diagram
The following example creates a new diagram from scratch, writes the words “Hello World!” on the first page, and saves the file.
Create new visio file
Opening an Existing File
The following example opens an existing Microsoft Visio template file, writes the words “Hello World!” in the first page, and saves the diagram as a new file.