I have a client who was having a hard time making windows in a Revit model imported into SketchUp transparent.
There was an older script layers_materials.rb, by Didier, which would have helped a lot, but I couldn't get it to work properly in SU 8
I took a look at getting the old script ruby working, and created a new version
*It would not run for me because of loading and run time errors in SU 8.
*I added some options to not change materials which are already assigned.
*I added some logic to only process each component definition once.
I have attached the result.
convert_materials_to_layer_names.rb
Put this in the plugins folder and give it a try.
After loading SketchUp, and importing a DWG file, select Convert Layer Names to Materials from the Plugins menu.

Create new materials for all layers (except Layer0) - If this is Yes, then new materials will be created to match all layers, except Layer 0. If it is No, then no new layers will be created, and only existing layers will be used. Only material names which match the layer names will be used.
Do not change existing, non default, material names - If this is cYes, then only faces with no material set will be set to the material with the same name as the entity's layer,. If it is No, then exiting materials will be overridden with the layer materials.
A report will be provided of new materials created and how many faces had their materials changed.
Let me know what goes wrong. (The first person to try a new plugin will undoubtedly find a problem or two)
[Edit - changed name of original script]