Add text in a drawing DWG in 3D
Posted: 29 Jul 2014, 22:08
I am testing the DEMO of CADImport .NET, How can I add a label with text in any element/part/entity of a drawing DWG in 3D?
CADSoftTools - AutoCAD DWG DXF HPGL (PLT) SVG CGM STEP IGES STL SAT viewers, converters and developer tools. Delphi and C# source code.
https://cadsofttools.com/forum/
Code: Select all
private void AddText(CADImage cadImage, DPoint basePoint, string textValue)
{
if (cadImage == null)
{
return;
}
else
{
if (cadImage.CurrentLayout == null)
return;
}
CADText text = new CADText();
text.Point = basePoint;
text.Height = 10;
text.Text = textValue;
text.Loaded(cadImage.Converter);
cadImage.Converter.OnCreate(text);
cadImage.CurrentLayout.AddEntity(text);
cadImage.GetExtents();
}