I believe I’m found the problem. The way I’ve been setting up my selection set to get each layer separately.
Dim intCode(0) As Integer
Dim varCodeValue(0) As Variant
intCode(0) = 8
varCodeValue(0) = “ThisLayer”
On Error Resume Next
ThisDrawing.SelectionSets("TEMP").Delete
Set objSS = ThisDrawing.SelectionSets.Add("TEMP")
objSS.Select 5, , , intCodes, varCodeValues
But it seems to work better if I write it like this…..
Dim intCode(7) As Integer
Dim varCodeValue(7) As Variant
intCode(0) = -4: varCodeValue(0) = "<AND"
intCode(1) = 0: varCodeValue(1) = "LINE"
intCode(2) = -4: varCodeValue(2) = "<OR"
intCode(3) = 8: varCodeValue(3) = "ThisLayer"
intCode(4) = 8: varCodeValue(4) = "OtherLayer"
intCode(5) = -4: varCodeValue(5) = "OR>"
intCode(6) = 67: varCodeValue(6) = "0"
intCode(7) = -4: varCodeValue(7) = "AND>"
On Error Resume Next
ThisDrawing.SelectionSets("TEMP").Delete
Set objSS = ThisDrawing.SelectionSets.Add("TEMP")
objSS.Select 5, , , intCodes, varCodeValues
Does it make sense that this change could solve the problem?