(C#) Is there any way to get the MText's length on the axis?

I want to get the length of the Mtext,not the text length, but the actual length on the axis .Now, I can use (mtext.InsertionPoint.X) to get the start point of that mtext, but I can not get the end point of the MText. The solution which I used now is get the( FullClearText.Length) of that Mtext and multiply a coefficient to get the estimated length, but how to get the accurate coefficient is not easy,different graph has different coefficient (maybe it depends on the word’s size or other factors). Is there any suggestion or method to solve this problem? thanks

@autopay,
MTEXT object doesn’t store end point directly, so you can only calculate it taking into account all other options of MTEXT (e.g., embedded into text value directly using special symbols), fonts, style, block this MTEXT can be located inside and other factors.

1 Like