Set Annotation visible false
Posted: Mon Aug 22, 2011 3:22 pm
Hello,
I want to write a function to switch all annotations of a image to visible false or true.
For this I use this code:
But I must reload the image to see the annoations visible false/true.
Any idea
regards
Michael
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