cart: empty [ Login ]

Layer transparency

1 
Joel Lucsy
3/11/2014 6:24 PM
I have a requirement that certain layers have transparency set, but I can't get the value to show up after saving. I've worked around the issue by having a template drawing that already has the layer and transparency set that I clone. But wondering if I could skip that step. Below is how I'm creating the layer.
C# Code:
var model = new DxfModel(); model.CreateDefaultObjects( true ); var layer = new DxfLayer( "test" ); layer.Transparency = Transparency.Create( 204 ); model.Layers.Add( layer ); DwgWriter.Write( @"c:\temp\1.dwg", model );
Wout
3/14/2014 2:05 PM
Hi, This was indeed not written to DWG yet. I've just implemented it in CadLib 4.0, can you try the latest version? Thanks for the report! - Wout
Joel Lucsy
3/14/2014 3:08 PM
Yes, the new version seems to work. The value I was seeing for the transparency seems to have changed, but seems consistent between reading and writing. Thanks.
1