Macro, save part as step with version number

Hi,

I'm trying to make an Macro that saves Step with the name as follows: Productname_RevX_Y.

First X is the revision number/letter and the Y is the Version number from solidw/pdm (or as I would have called it, the iteration)

I've looked through a numerus of different macro script but I struggling with getting the version number included in the name. 

Anyone know how to do this?

SolidworksApi/macros