I'm currently using 2001+ at work and was wondering if there was a free-ware program to print multiple drawings all at once? I have seen a couple of programs you can purchase but seems to me that this is an elementary program.
Or some simple code like the following - in a macro script - would work ok for $0 and a some time to adjust any of the code to work for you depending how much experience you have editing VB. I am supplying this at your own risk; although it does work for me. You'll need to set the directory in the code and make sure you end the directory with a backslash. You will also need to print at least one document with the settings you want before running the macro. It also helps to have the "Print Preview" box checked in your print dialog box for the first time you run it that way you can always cancel.
Copy and paste into a new macro.
Option Base 1
Dim swApp As Object
Dim longstatus As Long
Sub main()
Dim Part As Object
Dim Drawing As Object
Dim boolstatus As Boolean
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Dim ModelDoc2 As Object
Dim sPathName As String
Dim nErrors As Long
Dim nWarnings As Long
Dim nRetval As Long
Dim bShowMap As Boolean
Dim bRet As Boolean
Dim CurrentFile As String 'Declaring Var for file being parsed
Dim TheFiles() As Variant 'Declaring dynamic array for holding found drawing files
Dim FilePath As String
Dim FileName As String
Set swApp = CreateObject("SldWorks.Application") 'Attaching to SolidWorks
n = 1
FilePath = "D:\dir1\dir2\dir3\" 'type correct drive and directory name
ReDim Preserve TheFiles(n) 'Resizing dynamic array as data is captured
CurrentFile = Dir(FilePath & "*.slddrw") 'Getting name of first drawing file
TheFiles(n) = CurrentFile 'adding first drawing to array
Do While CurrentFile "" 'Setting up loop to capture all remaining drawings
CurrentFile = Dir 'Getting next drawing in the directory selected
If CurrentFile = "" Then
Exit Do
Else
n = n + 1 'incrementing counter
ReDim Preserve TheFiles(n) 'Resizing the array while preserving the contents
TheFiles(n) = CurrentFile 'Adding next drawing to array
End If
If n > 200 Then Exit Do 'Get out of jail free statement
Loop
n = UBound(TheFiles) 'Setting n to total place holders in the array
For n = UBound(TheFiles) To LBound(TheFiles) Step -1 'setting For-Next Loop
Or some simple code like the following - in a macro script - would work ok for $0 and a some time to adjust any of the code to work for you depending how much experience you have editing VB. I am supplying this at your own risk; although it does work for me. You'll need to set the directory in the code and make sure you end the directory with a backslash. You will also need to print at least one document with the settings you want before running the macro. It also helps to have the "Print Preview" box checked in your print dialog box for the first time you run it that way you can always cancel.
Copy and paste into a new macro.
Option Base 1
Dim swApp As Object
Dim longstatus As Long
Sub main()
Dim Part As Object
Dim Drawing As Object
Dim boolstatus As Boolean
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Dim ModelDoc2 As Object
Dim sPathName As String
Dim nErrors As Long
Dim nWarnings As Long
Dim nRetval As Long
Dim bShowMap As Boolean
Dim bRet As Boolean
Dim CurrentFile As String 'Declaring Var for file being parsed
Dim TheFiles() As Variant 'Declaring dynamic array for holding found drawing files
Dim FilePath As String
Dim FileName As String
Set swApp = CreateObject("SldWorks.Application") 'Attaching to SolidWorks
n = 1
FilePath = "D:\dir1\dir2\dir3\" 'type correct drive and directory name
ReDim Preserve TheFiles(n) 'Resizing dynamic array as data is captured
CurrentFile = Dir(FilePath & "*.slddrw") 'Getting name of first drawing file
TheFiles(n) = CurrentFile 'adding first drawing to array
Do While CurrentFile "" 'Setting up loop to capture all remaining drawings
CurrentFile = Dir 'Getting next drawing in the directory selected
If CurrentFile = "" Then
Exit Do
Else
n = n + 1 'incrementing counter
ReDim Preserve TheFiles(n) 'Resizing the array while preserving the contents
TheFiles(n) = CurrentFile 'Adding next drawing to array
End If
If n > 200 Then Exit Do 'Get out of jail free statement
Loop
n = UBound(TheFiles) 'Setting n to total place holders in the array
For n = UBound(TheFiles) To LBound(TheFiles) Step -1 'setting For-Next Loop
PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.