Restore Custom Attributes on Undo



I have some RhinoObjects with some custom attributes added to the UserDictionary. The problem I am running into is, when the object is deleted and then I undo the deletion the custom attributes are not restored with the RhinoObject. I think I remember reading something once that said I have to save the custom attributes if I want them to be restored with the undo command. The problem is that I can’t find any examples anywhere. Any help with this would be much appreciated.