@Abne,
Hi.
It seems there are issues with polylines in this example, but all other entities present in the file (they are near origin of the drawing). We will investigate this, could you please try the modified example below.
DwgImage dwgImage = new DwgImage();
//LINE, CIRCLE, ARC, TEXT, POINT, SOLID, 3DFACE and POLYLINE
//add line
CadLine line = new CadLine(new Cad3DPoint(0, 0, 0), new Cad3DPoint(100, 100, 100));
dwgImage.AddEntity(line);
//add circle
CadCircle circle = new CadCircle(new Cad3DPoint(50, 0), 10);
dwgImage.AddEntity(circle);
//add arc
CadArc arc = new CadArc(new Cad3DPoint(100, 0), 10, 45, 135);
dwgImage.AddEntity(arc);
CadText text = new CadText();
text.FirstAlignment = new Cad3DPoint(0, -50, 0);
text.TextHeight = 10;
text.DefaultValue = "text value";
dwgImage.AddEntity(text);
CadPoint point = new CadPoint();
point.CenterPoint = new Cad3DPoint(-10, -10, -10);
dwgImage.AddEntity(point);
CadSolid solid = new CadSolid();
solid.FirstCorner = new Cad3DPoint(200, 200, 0);
solid.SecondCorner = new Cad3DPoint(210, 200, 0);
solid.ThirdCorner = new Cad3DPoint(210, 220, 0);
solid.FourthCorner = new Cad3DPoint(200, 220, 0);
dwgImage.AddEntity(solid);
Cad3DFace cad3DFace = new Cad3DFace();
cad3DFace.FirstCorner = new Cad3DPoint(-200, 200, 0);
cad3DFace.SecondCorner = new Cad3DPoint(-210, 200, 0);
cad3DFace.ThirdCorner = new Cad3DPoint(-210, 220, 0);
cad3DFace.FourthCorner = new Cad3DPoint(-200, 220, 0);
dwgImage.AddEntity(cad3DFace);
var cadPoints = new List<Cad2DPoint>();
var point1 = new Cad2DPoint(-5, -5);
var point2 = new Cad2DPoint(-5, 10);
var point3 = new Cad2DPoint(20, 10);
var point4 = new Cad2DPoint(20, -5);
cadPoints.Add(point1);
cadPoints.Add(point2);
cadPoints.Add(point3);
cadPoints.Add(point4);
var cadPolyline = new CadLwPolyline
{
Coordinates = cadPoints,
Flag = CadLwPolylineFlag.Closed,
ConstantWidth = 0.1,
PointCount = cadPoints.Count
};
dwgImage.AddEntity(cadPolyline);
//Color example
CadLine lineColor = new CadLine(new Cad3DPoint(0, 0, 0), new Cad3DPoint(-100, 100, 0));
dwgImage.AddEntity(lineColor);
lineColor.ColorId = 15; //ACI color id
dwgImage.Save("fileResult.dwg");