I recently downloaded and used the latest version of sgcadexp.dll, and found a bug where CADText was displayed in the wrong location.
I tried to attach a test file, but could not attach due to the capacity limit.
Instead, I leave a Google Drive link so you can download it.
https://drive.google.com/drive/folders/ ... sp=sharing
------------------------------------------------------------------------
.Net Framework: 4.6.1
CADImport.dll: v14.1.0.45509
sgcadexp.dll(64bit): modified date is 2020-04-29. <==== Problem Version
sgcadexp.dll(64bit): modified date is 2020-01-31.
------------------------------------
Thank you
Code: Select all
string tmpDWGFile = "temp.dwg";
CADImage cadImage = CADImage.CreateImageByExtension(tmpDWGFile);
cadImage.LoadFromFile(tmpDWGFile);
CADImport.CADText text1 = new CADImport.CADText();
text1.HAlign = 1; // center
text1.VAlign = 1; // bottom
text1.Point1 = new DPoint(5600, -5600, 0);
text1.Height = 200;
text1.Text = string.Format("{0}", "(5600, -5600)");
text1.Color = Color.White;
text1.Layer = cadImage.Converter.LayerByName("0");
cadImage.Converter.Loads(text1);
cadImage.Layouts[0].AddEntity(text1);
CADImport.Export.CADtoDWG.SaveAsDWG(cadImage, "output")
if (cadImage != null)
{
cadImage.ClearBuffer();
cadImage.Dispose();
cadImage = null;
}
GC.Collect();