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.
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.