Anybody find a solution to the original issue here? I used Cleverbeans' routine from his 7/23 post, but I still have the issue of incorrect justification.
The really odd thing is that even if the place text dialog displays the correct justification before the macro is run, it will not justify text correctly unless I first manually change to another justification, back to the correct justification, and then run the macro. It's as if MicroStation VBA has it's own cached justification (at least for text nodes) that needs to be forceably updated before it changes.
I am using the following three lines of code to try and set justification before I plot text (using VBA also), and it does not work unless the manual change is done first.
SetCExpressionValue "tcb->msToolSettings.changeText.just", 2, "MODIFY" SetCExpressionValue "tcb->textStyle.just", msdTextJustificationLeftBottom, "MODIFY" ActiveSettings.TextStyle.Justification = msdTextJustificationLeftBottom
Note that after this I am plotting text using text nodes (not text elements). I am justifying each element in the node after creation. But the above error still occurs.
After pulling my hair out for hours, I think I have finally figured it out. Setting the justification for text nodes can be done this way:
CadInputQueue.SendKeyin "active tnj lb"
To translate:
tnj = text node justification
lb = left-bottom