Sub Ch2_IterateLayer()
' 遍历集合
On Error Resume Next
Dim I As Integer
Dim msg As String
msg = ""
For I = 0 To ThisDrawing.Layers.Count - 1
msg = msg + ThisDrawing.Layers.Item(I).Name + vbCrLf
Next
MsgBox msg
End Sub