Your First Aspose.Diagram Application - Hello World

Creating the Hello World Application

The steps below creates the Hello World application using the Aspose.Diagram API:

  1. Create an instance of the Diagram class.
  2. Apply the license:
    1. If you have purchased a license, then use the license in your application to get access to Aspose.Diagram' full functionality
    2. If you are using the evaluation version of the component (if you’re using Aspose.Diagram without a license), skip this step.
  3. Create a new Visio file, or open an existing Visio file.
  4. Create a new text box.
  5. Insert the words Hello World! into a text box.
  6. 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.