Your First Aspose.Diagram Application - Hello World
Contents[ Hide ]
This tutorial shows how to create a very first application (Hello World) using Aspose.Diagram' simple API. This simple application creates a Microsoft Visio file with the text ‘Hello World’ in a specified Page.
Creating the Hello World Application
The steps below creates the Hello World application using the Aspose.Diagram API:
- Create an instance of the Diagram 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 Visio file, or open an existing Visio file.
- Create a new text box.
- Insert the words Hello World! into a text box.
- Generate the modified Microsoft Visio file.
The implementation of the above steps is demonstrated in the examples below.
Code Sample: Creating a New Diagram and Writing Hello World!
The following example opens an existing Microsoft Visio template file named “Basic_Shapes.vss”, inputs “Hello World!” text in the first page and saves the diagram.