'*************将选择集中不不是当前空间中的对象去除********************
Public Sub FilterLayout(ByRef ss As ZcadSelectionSet, ByRef layoutName As String)
Dim max As Integer
Dim objArray() As ZcadEntity
max = -1
Dim i As Short
For i = 0 To ss.Count - 1
If LCase(ThisDrawing.ObjectIdToObject(ss.Item(i).OwnerID).Layout.Name) <> LCase(layoutName) Then
max = max + 1
ReDim Preserve objArray(max)
objArray(max) = ss.Item(i)
End If
Next
ss.RemoveItems(objArray)
End Sub
Public Sub FilterLayout(ByRef ss As ZcadSelectionSet, ByRef layoutName As String)
Dim max As Integer
Dim objArray() As ZcadEntity
max = -1
Dim i As Short
For i = 0 To ss.Count - 1
If LCase(ThisDrawing.ObjectIdToObject(ss.Item(i).OwnerID).Layout.Name) <> LCase(layoutName) Then
max = max + 1
ReDim Preserve objArray(max)
objArray(max) = ss.Item(i)
End If
Next
ss.RemoveItems(objArray)
End Sub