Can somone explain how Undo's work?
Like how to place them, and hook it up with "ctrl-z"?
Undo is managed by methods in the NXOpen.Session class. Some relevant methods:
UndoToLastVisibleMark is basically the same as <Ctrl>-Z