Edited usertexts not in Undo


After running a python script that sets the usertext of an object, hitting the Undo does not change the usertext back.

I tried to make an example script and I need to do something else in order to get anything in the Undostack for else there isn’t even an entry for undoing the script.

I noticed that if I move the object in the script Undo does revert the old usertexts
So if only the usertext of an objetect is changed this does not get stored into the Undostack it appears.

does this explanation make sense?

import rhinoscriptsyntax as rs

id = rs.GetObject('get something')

print 'before script :  usertext "testing" = ',rs.GetUserText(id, 'testing')
rs.SetUserText(id, 'testing', 'VALUE')

rs.AddLine([0,0,0],[1,1,1]) # add something to get an undostack

print 'after script :  usertext "testing" = ',rs.GetUserText(id, 'testing')


I am experiencing the same issue.

Yep, got it.


– Dale

1 Like


I have some scripts that follow the same methodology by using UserTexts.
Is it planned to be fixed in v6 only? Are the fixes for v5 completely closed now?


There are no more fixes coming for Rhino 5 for Windows.

– Dale