How to convert Sldworks File to PDF file with Revision Number?

Hi,

I want to convert my sldworks drawing document into PDF file with revision number by using macro. For example, If I have a Drawing document with file name of  "A-2056" and Revision Number "02",I should convert this into PDF with a file name of "A-2056r02" . I am new to Solidworks API, Can anyone help me to create macro for this?, Thanks in advance.

SolidworksApi macros