Hi,
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')
-Willem