Rename a part file name

Is it any macro available to rename a part and its references?

I found this example, but its for Assembly only.

2016 SOLIDWORKS API Help - Rename Components and Save Assembly Example (VBA)  

I need to rename a part with Macro.

Thanks

SolidworksApi macros