sgcadexp.dll, the latest version Issue
Moderators: SDS, support, admin
sgcadexp.dll, the latest version Issue
Hello
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
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();
- Attachments
-
- used_sgcadexp_dll_2020_4_29.PNG (16.95 KiB) Viewed 3326 times
Re: sgcadexp.dll, the latest version Issue
Hello,
Thank you for the files.
The problem is in your code: you are using the property CADText.Point1 which sets the second alignment point for the CADText object, while the text insertion point is specified through a CADText.Point property:
Mikhail
Thank you for the files.
The problem is in your code: you are using the property CADText.Point1 which sets the second alignment point for the CADText object, while the text insertion point is specified through a CADText.Point property:
Code: Select all
text1.Point = new DPoint(5600, -5600, 0);
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: sgcadexp.dll, the latest version Issue
Hello Mikhail
That's right. I need the second alignment point, so I used Point1 property.
Do you mean that I should set the Point property and insert the text entity, and then change the Point1 property of the text entity?
However, the old version of sgcadexp.dll is working, but why does not the latest one?
Thank you.
That's right. I need the second alignment point, so I used Point1 property.
Code: Select all
text1.HAlign = 1; // center
text1.VAlign = 1; // bottom
However, the old version of sgcadexp.dll is working, but why does not the latest one?
Thank you.
Re: sgcadexp.dll, the latest version Issue
Hello,
I meant if you need to insert a text at the point (5600, -5600, 0), you should set the Point property, otherwise, the text will be inserted at the point (0, 0, 0). I don't know why you need the second alignment point.
Mikhail
I meant if you need to insert a text at the point (5600, -5600, 0), you should set the Point property, otherwise, the text will be inserted at the point (0, 0, 0). I don't know why you need the second alignment point.
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: sgcadexp.dll, the latest version Issue
Hello
This is to use the alignment as I already mentioned.
You mean that the alignment (cadText.HAlign and cadText.VAlign) works on cadText.Point property instead of cadText.Point1.
However, this linked page says that I have to use Point1 instead of Point property.
http://www.cadsofttools.com/forum/viewt ... lign#p5500
I haven't checked if Point works for the alignment.
I hope that the Point works for it.
Anyway, thank you for your reply.
This is to use the alignment as I already mentioned.
You mean that the alignment (cadText.HAlign and cadText.VAlign) works on cadText.Point property instead of cadText.Point1.
However, this linked page says that I have to use Point1 instead of Point property.
http://www.cadsofttools.com/forum/viewt ... lign#p5500
I haven't checked if Point works for the alignment.
I hope that the Point works for it.
Anyway, thank you for your reply.