I want to write a function to switch all annotations of a image to visible false or true.
For this I use this code:
Code: Select all
Dim images As ImageCollection = AnnotationViewer1.Images
Dim annotations As AnnotationController = New AnnotationController(images)
Dim imageIndex As Integer, annoIndex As Integer
For imageIndex = 0 To images.Count - 1
Dim imageAnnotations As AnnotationCollection = annotations(imageIndex)
For annoIndex = 0 To imageAnnotations.Count - 1
Debug.Print(imageAnnotations(annoIndex).Visible.ToString)
imageAnnotations(annoIndex).Visible = Not imageAnnotations(annoIndex).Visible
Next annoIndex
Next imageIndex
Any idea
regards
Michael