Hello everyone,
does anyone know how to create a TextNode in CONNECT C # .NET?
many thanks and best regards,
Francesc,
Here is some example C# code for creating text.
//you'll need to get the textstyle you want to use before creating your text block TextBlock labelBlock = new TextBlock(textStyle, Session.Instance.GetActiveDgnModel()); labelBlock.AppendText("Line One"); labelBlock.AppendLineBreak(); labelBlock.AppendText("Line Two"); labelBlock.SetUserOrigin(labelOrigin); labelBlock.SetOrientation(dMatrix3D); TextNodeElement textElement = (TextNodeElement)TextNodeElement.CreateElement(null, labelBlock); SetElementProperties(textElement, coreBoringSettings.textLevelName, SymbologyValue.ColorByLevel, 1, "ByLevel"); textElement.AddToModel();
Answer Verified By: Francesc Calaf
Thank you so much!