用遍历功能: - Dim ent As Object
- Dim moSpace As Object
- Set moSpace = ThisDrawing.ModelSpace
- For Each ent In moSpace
-
- If ent.Linetype = "CENTER" Then
- ent.Layer = "中心线层_bychen"
- ent.color = acByLayer
- ent.Lineweight = acLnWtByLwDefault
- ent.Update
- End If
-
- If ent.color = acWhite Or ent.color = acGreen Then
- ent.Layer = "粗实线层_bychen"
- ent.color = acByLayer
- 'ent.Linetype = acByLayer
- ent.Lineweight = acLnWt035
- ent.Update
- End If
-
- Next
|