cart: empty [ Login ]

DxfColor not being applied on DxfLine

Sandeep Bhat
1/31/2022 11:10 AM
I am trying to add a DxfColor to a DxfLine from the code sample provided in the documentation. However when I open the dwg, it has the default color. I am using AutoCad TrueView for viewing the output. It does not show any line when I open in SAP 3D. Can this be a viewer issue or there are some prerequisites that I am unaware of? Below is the code: static void Main() { WWLicense.SetLicense("xxxxx"); var model = new DxfModel(); var color = new DxfColor(Color.CreateFromRgb(255,0,0)); model.Colors.Add(color); model.Entities.Add(new DxfLine(new Point2D(0,0), new Point2D(100,100)){DxfColor =color}); DwgWriter.Write("Sample.dwg", model); }
sample dwg not opening in SAP 3D Visual Enterprise Viewer.jpg
Sandeep Bhat
1/31/2022 12:01 PM
The AutoCAD TrueView not showing applied color.
sample dwg.jpg
1/31/2022 2:55 PM
This is a limitation of the trial version. - Wout
Sandeep Bhat
1/31/2022 4:17 PM
Thank you.