Thanks Martin, but I don't think that will work for what I'm wanting.
I must be missing something. What I think you're wanting is to be able to click within a selected text string and be able to determine what's to the left and what's to the right. I don't see why textbox won't work. You have a group 10 dxf code for the text, so you know the start point, and you have the X value for the click, so getting a length to compare the delta X from textbox to is trivial.
Maybe I should post the whole routine I use. I use it to reformat notes and such. You select the text entities, then click where the new right edge of the text should be. It works with any left justification or center justification. Handles gaps between lines. There is a known problem the first time it runs in a session with the new line width. Probably missed initializing a variable, which some day I'll have time to track down. I just run the routine asecond time at this point. Probably a lot that could be done to optimize the code. Uses bits of code and ideas picked up many places, including the swamp.
The routine if relatively fast. Reformatting 170 lines of my plan spec on my laptop is around 3 seconds. On my desptop computer a lot faster than that. For one or two lines it's as fast as the screen can paint, even on the laptop.
This may not be exactly what you're trying to do, but from your description it may be close. If not, no problem.
Martin