Jterry85
Mechanical
- Sep 28, 2010
- 9
Hello,
I'm looking for a Save As PDF Macro that's a little different from the ones I've found.
Here's what I'm looking for:
- Ability to save multiple open drawings as PDF files
- Save in original folder as drawing files
- Automatically name pdf file the name of drawing file AND name it the current revision (ex: saving "Connecting_Bar.slddrw" which happens to be REV2 in the custom part properties to "Connecting_Bar-Rev2.PDF"
I'm using solidworks 08
Below is the macro code I currently use:
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Dim FilePath As String
Dim PathSize As Long
Dim PathNoExtension As String
Dim NewFilePath As String
FilePath = Part.GetPathName
PathSize = Strings.Len(FilePath)
PathNoExtension = Strings.Left(FilePath, PathSize - 6)
NewFilePath = PathNoExtension & "pdf"
Part.SaveAs2 NewFilePath, 0, True, fale
End Sub
Anyone have a macro like this?
I'm looking for a Save As PDF Macro that's a little different from the ones I've found.
Here's what I'm looking for:
- Ability to save multiple open drawings as PDF files
- Save in original folder as drawing files
- Automatically name pdf file the name of drawing file AND name it the current revision (ex: saving "Connecting_Bar.slddrw" which happens to be REV2 in the custom part properties to "Connecting_Bar-Rev2.PDF"
I'm using solidworks 08
Below is the macro code I currently use:
Dim swApp As SldWorks.SldWorks
Dim Part As SldWorks.ModelDoc2
Sub main()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
Dim FilePath As String
Dim PathSize As Long
Dim PathNoExtension As String
Dim NewFilePath As String
FilePath = Part.GetPathName
PathSize = Strings.Len(FilePath)
PathNoExtension = Strings.Left(FilePath, PathSize - 6)
NewFilePath = PathNoExtension & "pdf"
Part.SaveAs2 NewFilePath, 0, True, fale
End Sub
Anyone have a macro like this?