Require a macro for creation of 3D PDF from SW part.

I need a macro to create 3D PDF from SolidWorks part model. I have created a macro for this by macro recorder but not able to run in different files.

SolidworksApi macros