AnnSaveArray example for Visual Basic
Note: This topic is for Document/Medical only.
'This sample saves the currently loaded annotations in memory (as a VARIANT)
'The variant is then saved as a readable annotation file
Private Sub AnnSaveArray_Click()
Dim AnnVar As Variant
Dim x As Long
Dim MyByte() As Byte
Dim lSize As Long
LEAD1.AnnSaveArray AnnVar, ANNFMT_ENCODED, False, SAVE_OVERWRITE, 0
lSize = UBound(AnnVar)
ReDim MyByte(lSize)
Open "d:\\work\\images\\a.ann" For Binary Access Write As #1
MyByte = AnnVar
For x = 0 To lSize
Put #1, , MyByte(x)
Next
Close #1
End Sub