グループアイテムの取得方法
Dim IllApp As New Illustrator.Application Dim IllDoc As Illustrator.Document = IllApp.ActiveDocument Dim gItem As Illustrator.GroupItem Dim lItem As Illustrator.Layer Dim pgItem As Illustrator.PageItem 'ドキュメント内の全てのグループアイテムを取得 その1 For Each gItem In IllDoc.GroupItem Console.WriteLine(gItem.GeometricBounds(2)) Next 'ドキュメント内の全てのグループアイテムを取得 その2 For Each pgItem In IllDoc.PageItems If pgItem.PageItemType = AiPageItemType.aiGroupItem Then Console.WriteLine(pgItem.GeometricBounds(2)) End If Next '各レイヤー直下のグループアイテムのみを取得 For Each lItem In IllDoc.Layers For Each pgItem In lItem.PageItems If pgItem.PageItemType = AiPageItemType.aiGroupItem Then Console.WriteLine(pgItem.GeometricBounds(2)) End If Next 'For Each gItem In lItem.GroupItem ' Console.WriteLine(gItem.GeometricBounds(2)) 'Next Next
グループアイテムがやたらめったら多い場合は、「各レイヤー直下のグループアイテムのみを取得」の方法で取得するのが良いのではないかと。
で、ここぞ、と言う時に再帰的に処理をしてさらに掘り下げてみれば、ムダなく取得できるはず。