Multi-pdf

Hello

I'd like to know if there is a macro on solidworks for recording, of all the plans opened in session.

Thank you in advance

 

 

1 Like

Hello; try to see this one but I don't know if it works...:

 

Dim swApp As SldWorks.SldWorks
Dim swAllModel As ModelDoc2
Dim lErrors As Long
Dim lWarnings As Long

Sub main()

Set swApp = Application.SldWorks
Set swAllModel  = swApp.ActiveDoc
swModel.Extension.SaveAs GetFilename(swAllModel.GetPathName) & " rev." & swAllModel.GetCustomInfoValue("", "Revision") & ".pdf", swSaveAsCurrentVersion, swSaveAsOptions_Silent, Nothing, lErrors, lWarnings

End Sub

Function GetFilename(strPath As String) As String
Dim strTemp As String
strTemp = Mid$(strPath, InStrRev(strPath, "\") + 1)
GetFilename = Left$(strTemp, InStrRev(strTemp, ".") - 1)
End Function

I just tested it and it doesn't work. I'm going to test it over the weekend unless someone gives you one. ;-)

Hello, I created a macro that makes all the PDFs of an assembly or there is one that makes all the PDFs of a folder, can it be suitable  ? 

@manu: ok thank you, I admit that I couldn't test this weekend.

@PL.: Yes, making PDFs in relation to a file can suit me.

Use SolidWorks Task Scheduler, it allows you to create tasks like export files or folders in the format you want and more you can schedule like put an export every Tuesday at 3 p.m

 Here.

1 Like

@matthieu: it's the planner of the premium version that allows this.

The standard lanifier is much more succinct:

 

1 Like

Hello

Here's a macro that should work:

http://www.lynkoa.com/tutos/solidworks-creer-tous-les-pdf-pour-un-dossier-0

2 Likes

Hello
I tried the macro of .PL because your idea is very practical.
But .PL's macro doesn't work. There is a compilation error at SUB main path = BrowseFolder, .PL!
But otherwise it's a good job.

Well done

@PL: I can't stop knowing where to indicate the source file

Hi all

Sorry I won't be able to update the macro until next week!