Sets the current annotation data from a variant byte array.
| Visual Basic |
|---|
Public Sub SetAnnFromVariant( _ ByRef v As Variant _ ) |
- v
- Variant byte array containing the annotation data.
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
| Set Annotations From Variant (Visual Basic) | Copy Code |
|---|---|
PrivateSubLoadFromDB() DimrsAsRecordset DimtmpVAsVariant '---------------------------- 'ThisassumesthevariableDBrepresents 'anopendatabase,andthatthisdatabase 'containsatablenamedAnnotationswith 'afieldnamedNXPDatathatcontainsthe 'annotationdata. '---------------------------- Setrs=DB.OpenRecordset("Annotations",dbOpenTable) If(rsIsNothing)ThenExitSub '---------------------------- 'werejustshowingthefirstannotationin 'inthetable,butofcourseyouwillwant 'toquerytheannotationyoureinterestedin '---------------------------- rs.MoveFirst '---------------------------- 'readtherecordintothevariant '---------------------------- tmpV=rs!NXPData.GetChunk(0,rs!NXPData.FieldSize) '---------------------------- 'tellNotateXpresstoretrieveannotationsfrom 'thisvariant '---------------------------- NotateXpress1.SetAnnFromVarianttmpV EndSub | |