When the undo operation undoes your work, it also records the current state in preparation for a redo operation. This recording for redo requires no further work on your part, because it uses the same filing mechanism as the undo operation, calling the object's dwgOutFields() function to record the object's state.
If you implement a partial undo for your modification function, you are responsible for recording for redo in your undo operation. This is usually accomplished by calling the appropriate set() functions. When your set() function is called, assertWriteEnabled() is invoked, which records the data for undo.