兰州人 发表于 2008-5-6 14:54:00

Array+Layers的应用

<p></p><p>Sub SetLayer()<br/>&nbsp; Dim LayerArray, LayerColorArray<br/>&nbsp; LayerArray = Array("粗实线", "虚线", "细实线", "中心线", "点划线", "尺寸线", "文本线")<br/>&nbsp; LayerColorArray = Array(1, 255, 3, 6, 4, 6, 2)<br/>&nbsp; Dim TestLayer As AcadLayer<br/>&nbsp; For ii = 0 To UBound(LayerArray) - 1<br/>&nbsp;&nbsp;&nbsp; Set TestLayer = ThisDrawing.Layers.Add(LayerArray(ii))<br/>&nbsp;&nbsp;&nbsp; TestLayer.color = LayerColorArray(ii)<br/>&nbsp; Next ii<br/>End Sub<br/></p>
页: [1]
查看完整版本: Array+Layers的应用