Solidworks, macro pdf sheet with name

Hello

I got a macro that allows me to save all the sheets of my drawing in PDF.

After trying many possibilities, nothing changed...

What I want is to be able to choose which sheet of the MEP I want to save as a PDF (1 sheet only)

In addition, my sheets always have the same name, maybe it's easier to integrate in the macro the name of the sheet I want to save as a PDF.

Thanks in advance!


pdf.txt
1 Like

Hello

I'm new here but macro-wise I have a bit of hindsight
So maybe I can help you

for the story of the name of the sheet at the registration it must be happening somewhere by the
swPathName = swPath + swName
 

In the swName variable you should be able to find the name of your PDF sheet
Genre: toto.pdf

It is given at the level of line A:
swName = Left(swName, InStrRev(swName, ".") - 1)
so this is the line that you will have to modify to change the name of your file save as PDF

On the other hand, I don't have enough hindsight on the history of solidworks drawings

1 Like

Hello

But how do you want to choose your paper? By creating the PDF only for the active sheet could it do the trick?

If so, this macro will be fine:

https://forum.solidworks.com/servlet/JiveServlet/download/470475-125892/Save%20Current%20Active%20Sheet%20As%20PDF.swp.zip

 

2 Likes

Thank you for your answers and your help!

Thanks to you and by making some modifications I got out of it!

Thank you

1 Like