'这样可以实现,其余部分自己加
Sub tt() Dim tuceng1 As AcadSelectionSet On Error Resume Next
Dim FilterType(0 To 6) As Integer Dim FilterData(0 To 6) As Variant FilterType(0) = -4 FilterData(0) = "<or" FilterType(2) = 0 FilterData(3) = "Line" FilterType(4) = 0 FilterData(4) = "Polyline" FilterType(5) = 0 FilterData(5) = "LWPolyline" FilterType(6) = -4 FilterData(6) = "or>"
ThisDrawing.SelectionSets.Item("tuceng1").Delete Set tuceng1 = ThisDrawing.SelectionSets.Add("tuceng1") tuceng1.Select acSelectionSetAll, , , FilterType, FilterData
Dim i As AcadLine For Each i In tuceng1 If i.Lineweight = 30 Then'即线宽0.3 i.Layer = "tt" Update End If Next
End Sub |