To put you in context, we are in the process of installing an ERP. However, it does not cover .PDF. The only way to automate Job launches by the ERP system (for automated printing) is to have a drawing directory in PNG format that will be supported by the ERP. and also, this ERP does not manage revisions.
Yes, I know, it's not practical.
However, in order to remedy this problem, I would like to make a macro for SolidWorks 2022, which would both create a PDF with the increment of the revision. This PDF will include all the sheets of the drawing, it will have to place them in a folder called archive which will include all the drawings with their revision increment (example: name fichier_R2). And another export, this one in .PNG that will create the images of the sheets and put them in the drawing folder. These images will not take into account the increment of the revision and will be overwritten each time the macro is activated.
I tried to modify a PDF/DXF export macro found on this site. On the other hand, I can't do it.
Hello So it's doable, you just have to change some of the code to export each sheet to PNG and store it in the right folders (you also have to give your folder structure unless you know how to code yourself). It is also necessary to specify where the property containing the revision is stored (in the 3D or in the plan) because its retrieval by macro depending on where it is located will not be the same. In summary, we need more information
In summary, from a SolidWorks drawing (.slddrw), I press the button of the macro in question.
It creates a .PDF file on behalf of the SolidWorks file that will have the revision increment taken from the custom property of the current document. will deposit it in an Archive folder
Then, he creates a .PNG file, which will also have the name of the SolidWorks file, which on the other hand, will not have the increment of the current revision that will be deposited in the drawing folder. Every time I enable the macro, the new .PNG file will overwrite the old one.
In the image, the black box is for the macro. The rest is to help understand the ERP process.
I hope this will help you to better understand my request.