本帖最后由 作者 于 2006-8-4 23:30:47 编辑
Sub test()
On Error Resume Next
Dim FilterType(0) As Integer Dim FilterData(0) As Variant
Dim Myset As AcadSelectionSet
FilterType(0) = 8: FilterData(0) = LayerName
ThisDrawing.SelectionSets.Item("Myset").Delete Set Myset = ThisDrawing.SelectionSets.Add("Myset") Myset.Select acSelectionSetAll, , , FilterType, FilterData
Myset.Erase
End Sub
,LayerName不能为当前层 |