AnnSaveArray example for Visual Basic
Note: This topic is for Document/Medical only.
'Please note the following:
'LEADRasterView1 refers to a LEADRasterView control
'Global declarations
Private WithEvents RasterAnn As LEADRasterAnnotation
Private RasterAnnToolbar As LEADRasterAnnToolBar
'In the Form_Load method:
Set RasterAnn = New LEADRasterAnnotation
Set RasterAnnToolbar = New LEADRasterAnnToolBar
RasterAnn.AnnParentRasterView
= LEADRasterView1
Private Sub AnnSaveArray_Click()
Dim RasterVar As New LEADRasterVariant
Dim lSize As Long
Dim abool As Boolean
abool = False
iret = RasterAnn.AnnSaveArray(ANN_FMT_NATIVE,
abool, RasterVar, SAVE_OVERWRITE, 0)
Open "c:\temp1.ann" For Binary Access Write
As #1
For i = 0 To RasterVar.ItemCount - 1
Put #1, , Cbyte(RasterVar.ShortItemValue(i))
Next i
Close #1
End Sub