标注有各种方法,请参考对象模型。 建图层可使用以下函数 Public Function CreateLayer(ssLayerName As String, Optional EntColor As Integer) As AcadLayer On Error Resume Next Set CreateLayer = ThisDrawing.Layers(ssLayerName) If Err Then Err.Clear Set CreateLayer = ThisDrawing.Layers.Add(ssLayerName) If EntColor <> 0 Then CreateLayer.color = EntColor End If End Function |