Hi Scott,
I beleive you have to access the layers via the layertable object. When you access the record, just like you would access the blocktable, you can pass a name to the program and get back an LayerId. Then you can use that layerID to set a layertablerecord to the specified layer. After that you i believe you can manipulate the object like it was an AcadLayer object.
here is some code from one of the labs in the .Net training.
Private Function CreateLayer() As ObjectId
Dim layerId As ObjectId 'the return value for this function
Dim db As Database = HostApplicationServices.WorkingDatabase
Using trans As Transaction = db.TransactionManager.StartTransaction()
'Get the layer table first, open for read as it may already be there
Dim lt As LayerTable = trans.GetObject(db.LayerTableId, OpenMode.ForRead)
'Check if EmployeeLayer exists...
If lt.Has("EmployeeLayer") Then
layerId = lt.Item("EmployeeLayer")
Else
'If not, create the layer here.
Dim ltr As LayerTableRecord = New LayerTableRecord()
ltr.Name = "EmployeeLayer" ' Set the layer name
ltr.Color = Color.FromColorIndex(ColorMethod.ByAci, 2)
' it doesn't exist so add it, but first upgrade the open to write
lt.UpgradeOpen()
layerId = lt.Add(ltr)
trans.AddNewlyCreatedDBObject(ltr, True)
End If
trans.Commit()
End Using
Return layerId
End Function
Hope that helps. Definitely a lot of code involved to set a layer!