I tried a lot of way to do that,but still failed.
TextNode element has not got the width,height and font properties.
Who can help? Thanks.
spike: TextNodeElement has not got the width, height or font properties.
TextNodeElement has not got the width, height or font properties.
A TextNodeElement is not a TextElement. A TextNodeElement is a container of TextElements. TextElements have properties concerning appearance and contain the text that you see in graphics.
You need to enumerate the TextElements contained in the TextNodeElement, and set the symbology for each TextElement that you find. Lookup GetSubElements in VBA help.
Regards, Jon Summers LA Solutions
Unknown said:A TextNodeElement is not a TextElement. A TextNodeElement is a container of TextElements. TextElements have properties concerning appearance and contain the text that you see in graphics.
TextNodeElement also has formatting properties, even when there is no text in it.
Just add a new text node in the GUI, then look at its Element properties,When one adds some text to the textnode, these properties are inherited, but the text node still has a sepate formatting - one can inspect the file with OpenDGN to see that.
So the remaining question is how to reach these properties through the Microstation API.Or is it some deprecated feature of DGN V7 that is deliberately made inaccessible?
E.Jamster: TextNodeElement also has formatting properties, even when there is no text in it
True, but the TextElements contained by that TextNodeElement are free to have their individual formatting. The original question is how to modify the contained text elements, not how to apply a text style to a TextNodeElement.
E.Jamster: Is it some deprecated feature of DGN V7 that is deliberately made inaccessible?
If it were a deprecated feature of V7, you would not see it in the user interface.
E.Jamster: how to reach these properties through the Microstation API
MDL provides the required functions. They are not exposed by VBA.
Unknown said:MDL provides the required functions. They are not exposed by VBA.
I suspected so. Thank you for the confirmation.