引用我的选择集增强类TlsSel
dispbbs.asp?BoardID=4&ID=28869
Sub ttttt() Dim ss As New TlsSel ss.Init "TlsSel1" ss.SetFilter 8, "0" ss.Selectobject acSelectionSetAll For Each i In ThisDrawing.CopyObjects(ss.ToArray, ThisDrawing.ModelSpace) i.Layer = "1" Next i End Sub
Dim ss As New TlsSel ss.Init ss.SetFilterType 8 ss.SetFilterData "居民地类" ss.Selectobject acSelectionSetAll For Each i In ThisDrawing.CopyObjects(ss.ToArray, ThisDrawing.ModelSpace)这一行报错,提示要求对象!!! i.Layer = "0000" Next i
我查了一下,发现ss.count为0