Convert Color by Layer Colors...
-
I've been trying to find a good solution to my problem involving color by layer. When I import a DWG into Sketchup from Revit, there is no material information, but all things come in on separate layers. If I color by layer, I can have the layers color or texture settings all setup so that I can simply reimport a revised dwg file and all the layers will appear as I want them to. This can almost work like an xref or Sketchup component.
But can I take that model and convert the colors to correspond to the objects themselves and not just the layer?
This could be the final solution to working from Autocad to Revit into Sketchup seamlessly. The benefits of that equation can be discussed, but the problem remains.
Any thoughts?
-
Obviously using a Style that has 'Color by Layer' will display things as you want... BUT to turn each object's color to match its Layer Color and then swap to the more normal 'Color by Material' it is NOT an easy task... There is currently no API method to get a Layer's Color. I wrote a hack to set a Layer's color BUT the reverse is not readily possible...
You could perhaps export a DXF of the SKP read every Layer name back in with its CAD color and reverse engineer that into an RGB color... but seems extreme ?
I think AdamB was hopeful about reading Layer colors from the SKP db... but I've heard nothing about it lately...
http://groups.google.com/group/sketchupruby/browse_thread/thread/ca5c730306b91246
and
http://forums.sketchucation.com/viewtopic.php?f=180&t=25697&p=311870#p311870 -
Thanks for the reply TIG.
It seems there are ways to do something once, which may be messy, but you do what you have to do. But having a systematic workthough that is untedious-ly repeatable is a whole other.
-
Is there a ruby anywhere to assign a SketchUp material to faces to match the name of the layer - but without trying to get the color from the color by layer. If so, then it would be relatively simple to set SketchUp materials for one or two layers.
I thought I had tried a ruby which did that sometime ago, but I can;'t seem to find it again.
(I found this thread while looking for just that plugin. Unfortunately it is hard to search for "Convert layer to material)
-
I found the ruby - layers_materials.rb - although it doesn't seem to work in SU 8.
-
I found a post at http://www.sketchucation.com/forums/viewtopic.php?f=180&t=23650&start=0, where TIG provides a link to DXFlayercols.rb. But I have to login to access the link and I can't seem to login and get back to that page without it asking me to login again (stuck in do-loop hell!).
-
I found TIG's DXFlayerscols.rb, but it doesn't seem to do anything, at least for SU 8
-
I'd really like a plugin like this. I find myself struggling a lot with the organization of materials and layers. In modo, my other primary application, it's quite straightforward and very simple.
-
I took a look at getting Didiers's Layer Names to Materials ruby working.
I posted a new version in this thread:
http://forums.sketchucation.com/viewtopic.php?f=323&t=36715
Advertisement