Hi there. Can anybody tell me if there is a GetAnnotationCount method for Drawing Document, not an IVew member? IModelDocExtention member is for parts only, as it seems. It returns zero for drawing.
Using IVeiw can return total number of annotations in the document by traversing all the views, but still there may be (and usually there are some) annotations on sheet layer, not hosted by any view.
I have a thought about some workaround such as traversing with IView::GetFirstAnnotation3 (still what if there are no views at all?) and IAnnotation::GetNext3 while GetNext3 succeeds (not sure though).
Any advice on situation? Or maybe there's a way to return an array of all the annotations in the drawing doc? =)
I've tried traversing Annotations with for loop. But it seems that GetNext3 returns pointers only for Balloons, though it should return for other type regardless since Annotation is a common class.
There are definetely more than 3 annotations. I added third balloon and another exception was thrown after i = 2. For 2 balloons it was i = 1 and exception. Though, exception after i = 2 when it actually was to stop iterating, is a question of a special interest, why doesn't it return another types of annotations??
Сообщение отредактировано: Sergey Kolesnik