HI,
there seems to be problem if you have file with multiple pages and you try to add comments on them. If both pages already have comments, you can get to situation where adding new comment is not possible anymore. Same applies to updating comments - as soon as you have multiple pages and comments on them an error is thrown.
Adding new comments to file with multiple pages and comments:
dataDir = "C:\\Users\\......";
// Load diagram
Diagram diagram = new Diagram(dataDir + "Comments.vsdx");
// Add comment
diagram.Pages[1].AddComment(7.205905511811023, 3.880708661417323, "test@");
// Save diagram
diagram.Save(dataDir + "AddComment_out.vsdx", SaveFileFormat.VSDX);
and same file when comments are updated:
foreach (Annotation annotation in annotationCollection)
{
if (annotation.MarkerIndex.Value == "1")
{
annotation.Comment.Value = targetText;
}
}
Comments.zip (17.8 KB)