Exported DXF color vs. Layer color (CNR)

I’m having a usability annoyance with layer colors and exported DXF. I made a line drawing with different layers, each layer had the appropriate color for our digifab rules (ex: red == cut, blue == dark etch, green == light etch). In each layer I also set the print color to match the layer color (which I expected to happen by default).

When I export to DXF, all the lines are set to color 256. The only way I can get colors in exported DXF is to change the Display Color for each line to “Custom” and set the color I want. This means that every time I change an object’s layer or add a new object I have to go in and set the Display Color by hand.

Is there an option/workaround that I’m missing?

Layer colors are transmitted correctly via DXF - at least here in Windows Rhino - it’s perhaps your import program that is causing problems. To test, export a DXF from Rhino with a few objects and your layer colors and then re-open it in Rhino. The layers should have kept their original colors.

–Mitch

The ability to re-import your own exported files is not a valid unit test. dxfgrabber is seeing the colors set to 256, but I’ll try it with Flow in the next week.

If there is a specific release of DXF that is completely supported, (someone at mcneel.com) please state that clearly in the documentation. Flow only works with R10, and while that is teh s uck, at least I know what to aim for.

Perhaps not. The only valid test would be to import the file into AutoCAD, the “owner” of dxf, and see if it works there, all other tests with other programs would be just as invalid. There are a gazillion flavors of dxf out there and every program supports them differently.

My point was that the layer colors are indeed contained in the export file - because Rhino can re-read them - and that any export-import operation from any two different programs has two potential translation problem areas - the export and the import.

You might look at the color option in the export scheme in Rhino and see if it’s set to RGB or AutoCAD and test to see if changing that helps or not.

–Mitch

I exported a 3dm file as “2004 Natural” (RGB) with color by layer and imported that into “QCAD” (open source CAD). Layer names and layer colors transferred correctly. Layers 3-6 have random colors. I will fire up my Mac and check later to see if this might be a MacRhino-only issue.

–Mitch

I think it is an OS X limitation, we don’t have that editing option for custom Schemes and we can’t edit the Standard Default Schemes (which is a good thing, IMHO). I’ll go try it in my wintel setup.


I’m going to flag this as CNR. I set the layers back to the default state and now I get the colors I want. I must have set them to black by accident or made some other error that was fixed by resetting them.