Save SW Files and output Edrawings

Hi:

    How to write macro when save SW file then output edrawings file ?

Thanks

SolidworksApi macros