Dim FilterType(1) As Integer Dim FilterData(1) As Variant Set sjx = ThisDrawing.SelectionSets.Add("sjx")
FilterType(0) = 2 FilterData(0) = "TK" '是圆
'FilterType(1) = 62 'FilterData(1) = 10 '颜色是3
FilterType(1) = 8 FilterData(1) = "0" '图层是0 Dim mode As Integer
mode = acSelectionSetAll 'sjx.Select mode, , , FilterType, FilterData sjx.SelectOnScreen FilterType, FilterData '选择设计线 Dim newvarAttributes, inpoint, entry1 As Variant Dim ss, sss, ssss As String Dim sjxcount As Integer sjxcount = sjx.Count Dim templateFileName As String Dim DOC1 As AcadDocument ReDim objects(sjxcount) As AcadEntity Dim retObjects As Variant
i = 0 For Each entry In sjx
Set objects(i) = entry i = i + 1 Next entry Set DOC1 = Documents.Add retObjects = ThisDrawing.CopyObjects(objects) '这里出错啊 MsgBox "1" ThisDrawing.Application.ZoomAll |