Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

I am interested in assigning color to a layer in the drawing:

 

Color: Dark Brown

 

I am trying to assign colot to Dark Brown without success. Please help. Thanks.

 

Sub Main()
    Dim oDrawDoc As DrawingDocument
    oDrawDoc = ThisApplication.ActiveDocument
    Dim oLayer As Layer
    ' oLayer = oDrawDoc.StylesManager.Layers.Item(68)
    oLayer = oDrawDoc.StylesManager.Layers.Item("Title (ISO)")
    Dim oNewLayer As Layer
    oNewLayer_Name = "XYZ"
    Try
    oNewLayer = oLayer.Copy(oNewLayer_Name)
    Catch
    MessageBox.Show("New layer, " & oNewLayer_Name & ": Exists", "Title")
    End Try
ThisDrawing.Document.StylesManager.Layers(oNewLayer_Name).Visible = False
ThisDrawing.Document.StylesManager.Layers(oNewLayer_Name).Plot = False
End Sub 

Need help to assign