本帖最后由 作者 于 2009-3-2 10:08:18 编辑
Layers.Count 图层数 Layers.Item(ii).Name 图层名 Layers.Item(ii).color 图层颜色 此程序是工作实践总结,简单明了 Sub ls() With ThisDrawing For ii = 0 To .Layers.Count - 1 With Layers.Item(ii) Debug.Print .Name, .color, .Lineweight, .Linetype, .PlotStyleName, .Plottable, .ViewportDefault End With Next ii End With End Sub 结果 粗边框线 140 40 Continuous Color_140 True False 细边框线 139 15 Continuous Color_139 True False 标题栏 131 15 Continuous Color_131 True False 粗实线 1 40 Continuous Color_1 True False 细实线 3 15 Continuous Color_3 True False 尺寸线 6 15 Continuous Color_6 True False 中心线 4 15 CENTERX2 Color_4 True False 剖面线 43 15 Continuous Color_43 True |