Message 1 of 3
Adding Variant array to Selection set
Not applicable
11-18-1999
07:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In my VBA application I have the following code:
ct = objBlk.Count
ReDim ssObjs(0 To ct - 1) As Variant
Set wbSS = ThisDrawing.SelectionSets.Add("SS2")
If Err Then
ThisDrawing.SelectionSets.Item("SS2").Delete
Set wbSS = ThisDrawing.SelectionSets.Add("SS2")
End If
For i = 0 To ct - 1
Set ssObjs(i) = objBlk.Item(i)
Next
wbSS.AddItems ssObjs
The last line does not seem to work, i.e. the ssObjs variant array has the
entities copied from the block, but it does not get added to the wbSS
selection set. I watched the varaible wbSS and it remains empty after the
code has run. What am I doing wrong?
Dilip Bhandarkar
ct = objBlk.Count
ReDim ssObjs(0 To ct - 1) As Variant
Set wbSS = ThisDrawing.SelectionSets.Add("SS2")
If Err Then
ThisDrawing.SelectionSets.Item("SS2").Delete
Set wbSS = ThisDrawing.SelectionSets.Add("SS2")
End If
For i = 0 To ct - 1
Set ssObjs(i) = objBlk.Item(i)
Next
wbSS.AddItems ssObjs
The last line does not seem to work, i.e. the ssObjs variant array has the
entities copied from the block, but it does not get added to the wbSS
selection set. I watched the varaible wbSS and it remains empty after the
code has run. What am I doing wrong?
Dilip Bhandarkar