How to get the distance between mass of centre of molecules pair via script

Hi every one
I have run NVT dynamics in Forcite,and there are 100 molecules in the cell.I have created mass of centre for each molecule by script,and I want to get the distance between mass of centre of molecules pair via script.I konw CreateDistance function can create distance between supplied items,but I do not know how use it to create distance between mass of centre.I have looked at the Help documents, but there is less information about it.


Thanks for your help
Sincerely 
Li