A macro that deletes all mates in an assembly and adds a fixed mate to all parts

Hey guys,

I was wondering if anyone had a macro that could dig through an assembly and delete all mates of all parts and subassemblies and then add a fixed mate to everything. 

I need it in my simplification process. 

Thanks,

BJ

SolidworksApi/macros