I'm working on a vba macro to rotate blocks and text parallel to the nearest line or arc. To do this i make an selectionset with all the lines and arcs in a specific layer and i make an selectionset with all the selected blocks and text. The problem is that when i fill the second selectionset the first is empty. How can i use 2 selectionsets The code is below Public SelectieBlockText As AcadSelectionSet Public SelectieLines As AcadSelectionSet Public Function SelBlocks() As AcadSelectionSet If ThisDrawing.SelectionSets.Count = 0 Then Set SelectieBlockText = ThisDrawing.SelectionSets.Add("block") Set SelectieBlockText = ThisDrawing.SelectionSets.Add("lijn") Else Set SelectieBlockText = ThisDrawing.SelectionSets.Item(0) Set SelectieLines = ThisDrawing.SelectionSets.Item(1) End If SelectieBlockText.Clear SelectieLines.Clear ' lines,arc ReDim gpCode(0 To 1) As Integer gpCode(0) = 0 gpCode(1) = 8 ReDim dataValue(0 To 1) As Variant dataValue(0) = "Line,Arc" dataValue(1) = "RotateLayer" Dim groupCode As Variant, dataCode As Variant groupCode = gpCode dataCode = dataValue SelectieLines.Select 5, , , groupCode, dataCode ' blocks and text ReDim gpCode(0 To 0) As Integer gpCode(0) = 0 ReDim dataValue(0 To 0) As Variant dataValue(0) = "insert,text" groupCode = gpCode dataCode = dataValue SelectieBlockText.SelectOnScreen groupCode, dataCode MsgBox SelectieLines.Count & " selectie lijnen" End Function