Sub SetLayer() Dim LayerArray, LayerColorArray LayerArray = Array("粗实线", "虚线", "细实线", "中心线", "点划线", "尺寸线", "文本线") LayerColorArray = Array(1, 255, 3, 6, 4, 6, 2) Dim TestLayer As AcadLayer For ii = 0 To UBound(LayerArray) - 1 Set TestLayer = ThisDrawing.Layers.Add(LayerArray(ii)) TestLayer.color = LayerColorArray(ii) Next ii End Sub
|