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
|