I have the SDK installed on my machine and have done some preliminary looking around. Is there a MDL function that would allow me to programmatically change the font of a text node? If so, what is that MDL function?
Christmas050873 said:Is there a MDL function that would allow me to programmatically change the font of a text node?
mdlTextNode_extract() and mdlTextNode_extractWide() get information about a text node element. The TextParamWide argument has the font no. as a member.
mdlTextNode_extract()
mdlTextNode_extractWide()
TextParamWide
There's no function to set the TextParamWide values in an existing text node element. Follow these patterns instead:
Jan Šlegr said:possibly every text in text node can have different parameters or text style assigned
Jan hits the nail on the head! The text values stored in the text node are not necessarily used by its constituent text elements. Each text element may have its own symbology.
Whatever, these days it's preferable to use a text style for each text element. To put things in perspective, the text API went through a dramatic change. The header file for CONNECT says this about TextParamWide: This structure should be considered deprecated; if possible, use TextStringProperties or RunProperties instead.
TextStringProperties
RunProperties
I would focus on the invidual text elements in the text node, and set the text style for each element. Ignore the possibly redundant symbology information stored in the text node.
Regards, Jon Summers LA Solutions