TextObject text position follows the cursor

I noticed that when I script the TextObject command it ignores any predetermined point and drops the text wherever the cursor happens to be.

Here is a short video. Watch what happens when I select 0,0,0 as the location of my text, but then delay 1 second to move my cursor.

Here is the code to test:

import rhinoscriptsyntax as rs
text = "Hello World"
pt = rs.GetPoint("Select a spot")
rs.Sleep(1000)
if pt:
    rs.Command("_-TextObject " + chr(34) + text + chr(34) + chr(32) + str(pt), True)

Is there something that has changed that I need to be aware of? Or is this unintentional? In V5 the text is placed at my pick point, as I expect it to be.

Thanks,

Dan

Hi Dan -I see that - I don’t think this is by design…

https://mcneel.myjetbrains.com/youtrack/issue/RH-42018

thanks,

-Pascal

I’ve discovered a workaround. If you select a point and immediately call up the TextObject command, the cursor doesn’t have a chance to move. The issue is apparent when you select a point, do a couple things (like enter a text height for example), then place the text. By taking care of business before selecting the point, this issue is hidden. It’s still broken, but it’s usable if you follow this technique.

Dan

Thanks for the tip Dan. We’ll have that fixed soon.

Great, thanks.

RH-42018 is fixed in the latest BETA

Thanks, I will check it out.

@DanBayn
I tested it, it seems to be working again, but there is an issue with the insertion point - see the other thread on the subject.

–Mitch

Yes, I see that too. That definitely needs to be tweaked.

Thanks,

Dan