SW command history using c# api

Hey Everyone.

I would like to be able to see the last 10 commands for a utility tool. Any advice on where to look? Are there callbacks that get triggered on tool/command change. Is there a command stack that is used in the undo function that I can access and read? New to the C# api. Let me know if you guys have any ideas.

Thanks

SolidworksApi macros