Hello,
I need to filter a selectset, in order to have only the objects I need (here balloons) in a collection.
I tried to test using "Typeof", the problem is some objects in the selectset are "empty".
What are thes "empty" objects ? And, more important, how can I found them ?
My current code is :
*******************************
Dim oSelection As SelectSet
Dim oSelectedBalloons As New Collection
Dim selectedObj As Object
Set oDoc = ThisApplication.ActiveDocument
Set oSelection = oDoc.SelectSet
For Each selectedObj In oSelection
If TypeOf selectedObj Is Balloon Then oSelectedBalloons.Add selectedObj
Next
********************************
This function if objects in the selectset are not empty.
How can I adapt it for empty objects ? Something like "if selectedObj = Nothing..."
Any idea welcome !
Hello
Try to enable a selectionfilter. Take a look at inventor programmers help and search for "AddSelectionFilter". There is a window selection example, which you can adept by changing the selectionfiltetypeenum.
So you don't have to "clean" your selection.
Hi,
Krieg is correct. In this case the filter enum is:
kDrawingBalloonFilter = 16906