Is change of existing page and shape comment possible?

Hi Aspose team,

I found how to add comment to comment to page (

http://www.aspose.com/docs/display/diagramnet/Add+Comments+to+Visio+Drawings)

Now question is how can I loop through existing comments and make their changes.

In attached document you have few comments (on page and on shape level) and then I am trying to read content of comment I am always getting "".

Code is very simple:

For Each page As Page In officeDocument.Pages
For Each shp As Shape In page.Shapes

oldText = shp.Misc.Comment.Value


Btw. this works for comments on shape but how to access existing comments on page level?

I found only Page.AddComment

How to access page comment?

How to change page and shape comments?

Thanks,
Oliver

Hi Oliver,


Thank you for contacting support. Unfortunately, there is no way to modify comments of the Visio diagram. We have logged this feature request under ticket id DIAGRAMNET-50570 in our issue tracking system. We’ll let you know once a significant progress has been made in this regard. We’re sorry for the inconvenience caused.

Hi Imran,

any news here?
Hi Oliver,

Thank you for asking about an update. Unfortunately, there is no available news yet. We've intimated our product team to take a look at your issue. We'll let you know in reference of any available updates.

Hi Oliver,


Thank you for being patient. We’ve received a response from our product team. They’re in progress to resolve it and has plans to include this feature in the upcoming version 6.1.0 of the Aspose.Diagram for .NET API. We’ll notify you once it is supported and available for the public use.

Hi Imran,

I just saw that you released 6.1.0 with enhancement: DIAGRAMNET-50570-Add support to modify comments in the Visio diagram.

Now on page level I see that there is AddComment so I suppose that this was the change, right?
Can you give some example how I can loop through all comments and make from code comment text change?

Thanks in advance,
Oliver

Hi Oliver,


Thank you for the inquiry. We’re in communication with our product team and will get back to you soon.

Hi Oliver,


Thank you for being patient. Please use this sample code:

[.NET, C#]
// load Visio
Diagram diagram = new Diagram(“C:/temp/Drawing1.vsdx”);

// collection of the annotations
AnnotationCollection annotations = diagram.Pages.GetPage(“Page-1”).PageSheet.Annotations;

// iterate through the annottions
foreach (Annotation annotation in annotations)
{
Console.WriteLine(annotation.Comment.Value);
string comment = annotation.Comment.Value;
comment += “Updation mark”;
annotation.Comment.Value = comment;
}
// save Visio
diagram.Save(“C:/temp/result.vsdx”, SaveFileFormat.VSDX);

The issues you have found earlier (filed as DIAGRAMNET-50570) have been fixed in Aspose.Diagram for .NET 6.1.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.