How to link the relation with sub part?

In sw2007, The sub part reference of  Assembly is changed ,but the relation is not changed 。

How to link the relation with sub part?

Reference :

Thanks.

SolidworksApi macros