NotateXpress 13 for ActiveX - User Guide > How To > Retrieve Annotations > Retrieve Annotations from .NXP |
NotateXpress™ annotations can be stored separately from the image via a NotateXpress annotation file (.nxp).
The following properties display in Windows Explorer when you right-click a NotateXpress annotation file, select 'Properties' and display the Summary page.
Title: The Title property gets and sets a string that represents the title of the annotation file.
Subject: The Subject property gets and sets a string that represents the subject of the annotation file.
Author: The Author property gets and sets a string that represents the author of the annotation file.
Comments: The Comments property gets and sets a string that represents comments associated with the annotation file.
If the AnnotationType property is set to NX_AnnotationType_NXP, the RetrieveAnnotation method loads annotations from a NotateXpress annotation file (.nxp) into NotateXpress. State information (e.g., tool attributes, groups, layers, selected items) is also stored within the annotation file, and is restored to NotateXpress when RetrieveAnnotation is invoked.
NXP annotations files on disk can only be read if they were originally created using StoreAnnotation(). If they were created using GetAnnIntoVariant() or GetLayerIntoVariant(), they cannot be read correctly from disk. |
NotateXpress provides methods for retrieving the current state of annotations via Variant variables. First set the AnnotationType property is set to NX_AnnotationType_NXP then use the SetAnnFromVariant method to restore annotations that are stored in a variant. To load an individual annotation layer from a variant, call the SetLayerFromVariant method.
When annotations are loaded from a file, the LayerRestored event is raised. Additionally, if the layer was saved with a password, the RequestLayerPassword event is raised. This provides a trigger for the application to provide the password, or display a dialog to the end user requesting the password. If the correct password is supplied during the RequestLayerPassword event, the layer is decrypted and loaded into NotateXpress.