Add Visio Diagram Comment C#

You may need to add comments to Visio diagram files for different scenarios. Particularly, the Visio diagrams are annotated with comments if something needs to be modified while getting it reviewed. Following such requirements, this article covers how to add a comment to a VSD or VSDX Visio diagram programmatically in C#.

Insert Comment in Visio VSD or VSDX File – C# API Installation

Aspose.Diagram for .NET API supports working with different Visio diagram formats like VSD, VSDX, VSX, etc. You can easily configure it by downloading the reference DLL files from the New Releases page or running the following NuGet installation command:

PM> Install-Package Aspose.Diagram

How to Add Comment in Visio VSD or VSDX Diagram in C#

You can annotate a Visio VSD or VSDX diagram by inserting comments while following the steps below:

  1. Load the input Visio diagram.
  2. Append a comment to a specific page.
  3. Save the output Visio file.

The next section further elaborates on the process in addition to a sample code snippet:

Add Comment to Visio Diagram in C#

You may add a comment to a Visio diagram with the following steps:

  1. Load the input Visio diagram with the Diagram class.
  2. Insert a comment while specifying the page number
  3. Export the output Visio diagram by invoking the Save method.

The code snippet below demonstrates how to add a comment to a Visio diagram programmatically in C#:

Get a Free API License

You may get a free temporary license to evaluate the API to its full capacity.

Conclusion

In this article, you have understood how to add a comment to a Visio diagram in VSD or VSDX format programmatically in C#. Furthermore, you may explore other features of the API by taking a look at the documentation section. In case of any concerns, you can always contact us at forum.

See Also

Convert Visio to HTML in Python