Extracting <SHIFT>ed carriage returns from text nodes

Hi folks,

 I have an old problem with text nodes that's been around since I ported to v8. In MicroStation v8.0-v8.9 (have not tested with V8i yet)  there seems to be  a distinct difference between text nodes created by hitting <RETURN> between lines, and hitting <SHIFT><RETURN>.

When you Analyze the element the only difference you notice is that there is an extra space in the selection after the line end when <SHIFT> was used. So it seems that an extra character is used and stored to differentiate a normal carriage return from a shifted one.

 The problem for me comes about when I programmatically  try to process one of these text nodes. What happens is the SHIFT-ed text node gets replaced as a text node with all text on one continuous line. Deeper inspection of the text node reveals that the primary difference between the two node types is that if you held <SHIFT> then the value of the "txtParamWide.exFlags.crCount" is always zero, whereas without <SHIFT> it is always one or more. When the actual text is extracted using "mdlText_extractString()" or "mdlText_extractStringsFromDscr()" or "mdlText_extractWide()", then there is no difference between the two strings, so it seems extracting the text is a dead-end.

So somewhere internally there is this special carriage return stored and I really need to find out how to extract it so I can rebuild the original text node correctly with all lines separated. I have examined all the usual API functions and can not find any flag or structure which might store this information. It does not seem to be stored in the TextParamWide structure, so my only hope is to hack at the raw element structure directly.

 Can anyone shed any light on this <SHIFT> behaviour of text nodes?

Cheers.

 

 

Parents
  • The TextParamWide structure is actually represented by 3 linkages: TEXTATTR_ID, LINKAGEID_TextAnnotation, and LINKAGEID_TextRendering. As you provide a TextParamWide to the create function, I believe it removes all 3 linkages in favor of using the data that you provide. Other notable text linkages include TEXT_IndentationLinkage, BITMASK_LINKAGE_KEY_TextWhiteSpace (sub-key for bitmask linkage), and the along-text dependency linkage (private use).
Reply
  • The TextParamWide structure is actually represented by 3 linkages: TEXTATTR_ID, LINKAGEID_TextAnnotation, and LINKAGEID_TextRendering. As you provide a TextParamWide to the create function, I believe it removes all 3 linkages in favor of using the data that you provide. Other notable text linkages include TEXT_IndentationLinkage, BITMASK_LINKAGE_KEY_TextWhiteSpace (sub-key for bitmask linkage), and the along-text dependency linkage (private use).
Children
No Data