AccusoftNotateXpress13 ActiveX DLL > NotateXpress Object : SetAnnFromVariant Method |
Visual Basic |
---|
Public Sub SetAnnFromVariant( _ ByRef v As 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
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