cart: empty [ Login ]

Change entity color in dwg file

1 
Ahmad Soliman
8/14/2021 11:00 AM

I'm trying to change entity color by using the following code

C# Code:
private static void Draw() { DxfModel model = new DxfModel(DxfVersion.Dxf15); DxfLine dxfLine = new DxfLine(MakeEntityColorByBlock(System.Drawing.Color.Red), new Point3D(-2, -2, 0), new Point3D(2, 2, 0)); model.Entities.Add(dxfLine); model.ZoomExtents(); DwgWriter.Write("test.dwg", model); } public static EntityColor MakeEntityColorByBlock(System.Drawing.Color a_color) { return EntityColor.CreateFromRgb(ColorType.ByBlock, a_color.R, a_color.G, a_color.B); }
the export going smooth and success, but when i'm trying to open the dwg file in Autocad, the line color ( layer color) is orange not red. am i missing something ?

2.PNG
1.PNG
Wout
8/14/2021 11:03 AM

This is a limitation of the trial version. - Wout

Ahmad Soliman
8/14/2021 11:12 AM

Thanks Wout for your fast response. Where can i find list of the limitation to be aware of. i'm afraid to spend time thinking i'm doing some wrong coding while it's a limitation :p

Wout
8/14/2021 11:23 AM

You see on the CadLib web page right under the download button it says this. It doesn't say anything else. - Wout

Ahmad Soliman
8/14/2021 11:28 AM

Thanks wout I noticed that now

1