How to use Checkin trigger to activate a macro?

Hello All

I have finally found a great "drawing to pdf" macro but I have also found through the process that I can use triggers in PDM to start other features.

Can anyone help in creating a code or guiding me on how to do it in order to modify my macro so it will be launched by a Checkin trigger from PDMWorkgroup rather than a simple button that I have now.

This way everytime a user checks in a document, a pdf version will be automatically saved to MRP system folder where MRP can reference it.

Thank you in advance

SolidworksApi macros