Thanks....I actually just figured that out.
Now, I'm trying to get the actual layer name. My code is working but I don't feel it's the most efficient way of doing it.
Here it is:
Dim id As ObjectId
Dim bt As BlockTable = CType(trans.GetObject(db.BlockTableId, OpenMode.ForRead), BlockTable)
For Each id In bt
Dim btr As BlockTableRecord = CType(trans.GetObject(id, OpenMode.ForRead), BlockTableRecord)
Dim btrID As ObjectId
For Each btrID In btr
Dim ent As Entity = CType(trans.GetObject(btrID, OpenMode.ForRead, False), Entity)
If TypeOf ent Is BlockReference Then
Dim blkRef As BlockReference = CType(ent, BlockReference)
blkRef = ent
If blkRef.LayerId = db.Clayer Then
MsgBox("Current Layer: " + blkRef.Layer)
Exit Sub
End If
End If
Next
Next
If you could give me a better way, that would be awesome!!
Thanks again!