Sub wm()
Dim ent As AcadEntity
Dim tet As String
For Each ent In ThisDrawing.ModelSpace
If ent.linetype = "acad_iso05w100" Then
' On Error Resume Next
Dim layc As AcadLayer
Set layc = ThisDrawing.layers.add("虚线")
layc.Color = acWhite
layc.Lineweight = acLnWt050
ent.layer = "虚线"
ent.Color = acByLayer
ent.Lineweight = acLnWtByLayer
ent.linetype = "acad_iso05w100"
End If
Next
ThisDrawing.PurgeAll
End Sub