Programmatically go through each annotation on a document

  Imaging Toolkit

If one intends to reach all of the annotation objects, one have to use the AnnoObjSelectNext method.
One should use the AnnoObjDeselect method for deselecting the last selected object before using AnnoObjSelectNext again.
If one use the AnnoObjDeselect method the AnnoObjSelectNext method will start from the beginning to select annotation objects.
In this case one can reach all annotation objects again.

For example:
In this VB example the color of the annotation objects will be red:

Private Sub mnutest1_Click()
Dim hdc As Long

hdc = ActiveForm.BlackIce1.GetDC ‘ BiDisp.ocx control

‘ Deselect annotation object selected previously
ActiveForm.Anno.AnnoObjDeselect hdc

While ActiveForm.Anno.AnnoObjSelectNext > 0
ActiveForm.Anno.AnnoObjSetRGBColorComponents 255, 0, 0
Wend

ActiveForm.BlackIce1.UpdateControl 0, 0, 0, 0
End Sub

Copy this method to the Annotation VB sample, and try it.

Regards,
Technical Support Team