SetUserText is not in the undo stack

SetUserText is not in the undo stack - will this be added in V6

Does SetObjectText get added to the undo stack ?

Keith

There are lots of ways to “SetUserText.” How are you doing this?

Sorry to revive an old thread but I was just about to post something with the same title :wink:

This can be demonstrated by running the following scripts:

Script A:

import rhinoscriptsyntax as rs
rs.AddLine([0,0,0],[0,100,0])
rs.SetDocumentUserText("TEST","True")

Script B:

import rhinoscriptsyntax as rs
rs.AddSphere([0,0,0],10)
print str(rs.GetDocumentUserText("TEST"))

If you run script A then B, the document user text is returned (as expected). If you then undo both scripts (Ctrl + z) (both the sphere and line should be gone), then run script B, it will still return true.

Is there another way to use this feature that would add it to the undo stack?

@dale Is this a bug or is there another way around this?

Hi @wattzie,

Setting document user text is not undo-able. I know no way around this.

– Dale