find all shape entities

Sep 21, 2012 at 2:14 PM

The [Diagram.Shapes] will return shapes and aggregate shapes (groups).

I want to find all shapes (shapes insided the aggregates/groups).

Do i have to do this recursively?  (..because there can be groups within groups)??

can you give me a quick sample on how to do this?

Coordinator
Sep 21, 2012 at 2:39 PM
alexdoan102 wrote:
I want to find all shapes (shapes insided the aggregates/groups). Do i have to do this recursively?  (..because there can be groups within groups)??

Yes.
If you want to search the child shapes, you have to check whether shape.Children.Count > 0 and (recursively) search the shape's children, too.