Change reference

How to replace the incorrect reference of components in an open document?

SolidworksApi macros