PeterPan9720 Posted September 19, 2010 Posted September 19, 2010 Pls somebody knows if is there a limits in the number of objects selectable from the below code ? If I reach a quote of more than 14600 is there any know limits ? later I have to modify the layer of each !. Thanks ThisDrawing.SelectionSets.Add ("BOM1") Set Ssnew1 = ThisDrawing.SelectionSets("BOM1") Ssnew1.Select acSelectionSetAll For Each Entity1 In Ssnew1 On Error Resume Next If Entity1.Layer = MyNome(i - 1) Then If Entity1.Layer <> "0" Then Entity1.Layer = MyNome(i) 'array containing the list of array. Debug.Print Entity1.Layer, Conteggio Conteggio = Conteggio + 1 End If End If Next Quote
rocheey Posted September 22, 2010 Posted September 22, 2010 Of the code I see, id say the max items you'd be able to select, would be NONE. I dont see any variables typed: are they all Variants? I dont see where the variable "i" is referenced, so it would be set to a value of zero, so then "MyNome(i - 1)" returns an array index of -1 ... that would error out. also, you keep setting an error trap "On Error Resume Next" in your loop, without having the mating end of the trap (On Error Goto 0). That could give you trouble in large selection sets. Quote
PeterPan9720 Posted September 22, 2010 Author Posted September 22, 2010 Thank you for your support, The code is working well, even if it's not well commented or all variable are not defined, the main problem was concern the max num of item selectable by selection set function. If you are sure about that there are no limits, I'll investigate more iside the code. Regards. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.