求助:怎样复制AcadSelectionSet对象,
比如 :
Dim ssetObj As AcadSelectionSet Dim ssetObj2 As AcadSelectionSet Set ssetObj = CreateSelectionSet("sk")
…………
: ssetObj2(I) = ssetObj(J)【这样赋值出错,应该怎么赋值呢?】
我要达到的效果是把ssetObj(J)的全部内容赋给ssetObj2(I)
谢谢了。
Dim tmpObj As AcadEntity, i As Integer, xObj() As AcadEntity '合并选择集中的对象 If InOutSet Is Nothing Or InSetX Is Nothing Then Exit Function If InSetX.Count = 0 Then Exit Function 'Else MsgBox InOutSet.Count ReDim xObj(i) For Each tmpObj In InSetX ReDim Preserve xObj(i) Set xObj(i) = tmpObj: i = i + 1
Next InSetX.Delete If UBound(xObj) = 0 And xObj(0) Is Nothing Then Exit Function InOutSet.AddItems (xObj)