There must be something that unselects it in your code because it's running fine on my end. Perhaps a Thisdrawing.Regen statement after select command.
Originally Posted by ncraig122139
1. Directly, No, maybe because its read only. Indirectly, yes. My workaround will select it therefore it became the active selection set.
2. Probably. Why not use filters in Selection sets? Similar to QSelect features. (see sample code below.)
3. Why append if there's Nothing found?
By using Filters, your code can be simplified in this way.
This will be faster because there will be no longer a need to iterate all objects and test if it is a block.
Dim sSetBlocks As AcadSelectionSet
On Error Resume Next
Set sSetBlocks = ThisDrawing.SelectionSets.Add("SSET_BLOCKS")
If Err Then
Set sSetBlocks = ThisDrawing.SelectionSets("SSET_BLOCKS")
Dim FilterType(0) As Integer
Dim FilterData(0) As Variant
FilterType(0) = 0
FilterData(0) = "Insert"
sSetBlocks.Select acSelectionSetAll, , , FilterType, FilterData