Hi Jeff Barrette,
Thanks for the update. That method will be convenient to have.
After working more with text in layouts there are a few more utility methods/options that would be critical to what I'm trying to do, and which I'd expect would be extremely useful to users in general. In order of importance:
1) Option for paragraph text to both wrap to new lines and shrink font size automatically. Currently, the text automatically wraps to new lines, but when it reaches the bottom of its envelope, it gets cut off and shows an ellipsis symbol. It would be extremely nice to set some 'AutoShrink' property to 'true' and have the text automatically wrap to new lines and then shrink the font size until all of the text fits within the allotted envelope. Or, instead of having a boolean setting, a particularly useful way that this option could be implemented would be to have an property on the paragraph text like 'OverflowBehavior' that has some underlying enumeration of choices like 'ShowEllipsis', 'ShrinkFont', 'ExpandEnvelopeHorizontally', 'ExpandEnvelopeVertically'. In this way, a user could control exactly how the text should look without worrying about it being truncated.
2) It would be great to have the same GetBounds() method for paragraph text as you just added for point text, which would return the actual bounds of the drawn text. For instance, I may create a 6" X 6" envelope to draw my paragraph text in, but the text itself ends up being drawn in a 6" X 1.1" space, the GetBounds() method would return the 6" X 1.1" envelope. Currently, if you check the bounds on a paragraph text object, it simply gives you back the original envelope...you have no way to tell how much space is actually occupied by the text. In a situation like mine, where I am trying to arrange multiple text elements with dynamically generated text in a layout such that it takes up as little space as possible, it would be tremendously helpful to know the bounds of the drawn text on the screen.
3) Property on paragraph text that says whether or not the text overflowed its envelope. There is apparently no way to tell whether or not the text overflowed other than visually looking at the layout, where the tiny ellipsis indicator is shown. In my case, I am dynamically creating text elements from code, and want to prevent the ellipsis from ever appearing. Arc Pro obviously has access to this property, since it is showing the ellipsis in response, but there is apparently no way to access it from the API.
The underlying problem that all three of these issues address is this: I have the ability to draw paragraph text, but there is no way to ensure programmatically that the text fits within the specified envelope. I also have no way to check how much space the text is actually taking up, and therefore cannot optimize the placement of the text within the layout.
I really appreciate your continued efforts to improve the API and hope you consider adding at least one the suggestions above.
Thanks again,
Brennan