Annotation Copy/paste

Discussions about annotation support.
Post Reply
win568
Posts: 44
Joined: Tue Mar 24, 2015 1:00 pm

Annotation Copy/paste

Post by win568 » Tue Mar 24, 2015 1:04 pm

Hi

You write in your Release Notes, that it is possible to Copy and Paste Annotations. Unfortunatelly I did not find in the TLB a function to Copy/Paste a Selected Annotation.

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Annotation Copy/paste

Post by Loïc » Thu Mar 26, 2015 11:49 am

Hi,

To copy use the GetAnnotationXML() method.
see: https://www.gdpicture.com/guides/gdpicture/web ... onXML.html

To paste, use the AddAnnotationFromXML() method.
see: https://www.gdpicture.com/guides/gdpicture/web ... omXML.html

Please let me know if you need further information.

With best regards,

Loïc

win568
Posts: 44
Joined: Tue Mar 24, 2015 1:00 pm

Re: Annotation Copy/paste

Post by win568 » Thu Mar 26, 2015 5:02 pm

Hi

Thank you for your Response. I tried your solution to Copy an Annotation. When i call the Method GetAnnotationXML, i did not get any result (Value was empty). The GetStat() Method of the AnnotationManager responds GdPictureStatus_OK.

I added the Annotation with Viewer.AddLineAnnotInteractive. The AnnotationManager will be connected after i added the Annotation to the Viewer. Can this be the Problem, why it does not work ??

win568
Posts: 44
Joined: Tue Mar 24, 2015 1:00 pm

Re: Annotation Copy/paste

Post by win568 » Tue Mar 31, 2015 1:51 pm

Ok.

After further testing, i found a solution. When i use the GDViewer, i have to use the AnnotationsManager from this Class. To Create a new one and Connect it with the GDViewer does not work.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest