Check for inplace mates before saving a document

I have been away from Solidworks for a few years now, and I've recently had a feature request to check for in place mates before the program saving the document as a new part.  Solidworks runs this warning when you run Save As from the menu.  It throws a warning

"There are parts that have features defined in the context of "{path}".  If you select ok to continue this operation, these features will not update in the context of the newly saved assembly.  It is highly recommended that you consider saving new versions of these parts now which will update in the context of the newly saved assembly.  To do this, select cancel, select references from the save as dialog box, hen input new names for those parts that you want to update in the new assembly."

I'm basically trying to replicate this behavior.  Suggestions?

SolidworksApi macros