Gets the current annotation data into a variant byte array.
- v
- A variant to receive the annotation data.
- count
- The address of a long to receive the size of the byte array copied to the variant.
The variant data will be in the format of the AnnotationType
The exception is that the NX_AnnotationType_I4W is not honored and will automatically try to use NX_AnnotationType_NXP
GetAnnIntoVariant (Visual Basic) | ![]() |
---|---|
PrivateSubSaveAnnotation() DimvAsVariant DimcbSizeAsLong DimrsAsRecordset NotateXpress1.GetAnnIntoVariantv,cbSize '-------------------------------- 'oncetheannotationdataisinavariant, 'youcanstoreitintoadatabase. 'youcanverifythelengthbyeithertesting 'cbSizeorbyLen(v) '-------------------------------- 'ifyouwanttosavethese,youshouldaccess 'thesevaluesfromtherespectiveproperties '-------------------------------- 'ThefollowingassumesthevariableDBrepresents 'andopenAccessdatabasecontaininga 'tablenamedAnnotations,andwithfields 'namedImgFileandNXPData.TheNXPDatafield 'isdefinedasaMemofield(dbLongBinary) '-------------------------------- Setrs=DB.OpenRecordset("Annotations",dbOpenDynaset) rs.AddNew '-------------------------------- 'storefilenameofcurrentimagefile '-------------------------------- rs!ImgFile=App.Path&gCurrentImage '-------------------------------- 'nowstoretheannotationdatafromourvariant '-------------------------------- rs!NXPData.AppendChunkv rs.Update rs.Close Setrs=Nothing EndSub |