Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing multiple drawings 1

Status
Not open for further replies.

DerekCoffyn

Mechanical
Apr 7, 2011
3
I use Inventor 2011 and am looking for the easiest way to quickly print multiple part drawings. All drawings are created from the same drawing template. I might have a dozen or 2 drawings open and i would want to print them all with out having to click to each one, 'menu', 'print', 'ok'. Any suggestions?
Derek
 
Replies continue below

Recommended for you

Assuming you don't use multiple sheets for your part details, then it isn't possible. It wont do exactly what you want but you can print multiple drawing files with task scheduler. Only really useful if you have a lot to print though.
 
You can do it in inventor but if you open the folder with all the drawings, highlight the ones you want to print, right click and say print it will print all the files.

I use this method alot on individual piece parts. I only have experience do this with several 1 page prints all sheet size A. not sure how it works with multiple sheets or sheets of different sizes.

you can also use this to open several parts at the same time. A word of caution, This method opens all the prints and prints them thru inventor one at a time. It can take time to do large quantities. I usually do 10 to 12 at a time cause its really a pain to interrupt.
 
Sorry, i got interrupted during that post and did not preview that.

You cannot do it in inventor, you can do it through windows.
 
Visual Basic my friend. I wrote this little gem for printing all IDW's in a folder. Let me know if you need it broken down/explained better.

Open Inventor > Press Alt+F11 > Click the + next to ApplicationProject on the left > Click the + next to Modules > Double click Module1 and paste the following:

'This code will print all files in a selected folder to your default printer on their default sized sheet

Sub BatchPrinterSub()
'Code provided by Kinetic Consulting - CAD Automation Specialists
On Error GoTo errHandle
Dim FSO As Scripting.FileSystemObject
Dim SourceFolder As Scripting.Folder, SubFolder As Scripting.Folder
Dim FileItem As Scripting.File
Dim r As Long
Set FSO = New Scripting.FileSystemObject
searchFolder = BrowseForFolder()
Set SourceFolder = FSO.GetFolder(searchFolder)
For Each FileItem In SourceFolder.Files
' display file properties
If LCase(Right(FileItem.ShortName, 4)) = ".idw" Then
PrintCount = PrintCount - 1
GoTo printThisFile
returnAfterPrint:
End If
Next FileItem

Set FileItem = Nothing
Set SourceFolder = Nothing
Set FSO = Nothing

Exit Sub

printThisFile:
Dim oOptions As NameValueMap
Set oOptions = ThisApplication.TransientObjects.CreateNameValueMap
Call oOptions.Add("DeferUpdates", True)
Dim fn As String
Dim oDoc As DrawingDocument
Dim oDrgDoc As DrawingDocument
Dim oDrgPrintMgr As DrawingPrintManager

fn = FileItem.Path
Set oDoc = ThisApplication.Documents.Open(fn, True)
If ThisApplication.ActiveDocument.DocumentType = kDrawingDocumentObject Then
Set oDrgDoc = ThisApplication.ActiveDocument
Set oDrgPrintMgr = oDrgDoc.PrintManager
oDrgPrintMgr.ScaleMode = kPrintBestFitScale 'kPrintCustomScale & oDrgPrintMgr.[Scale] = 1
oDrgPrintMgr.PaperSize = kPaperSizeLetter
oDrgPrintMgr.PrintRange = kPrintAllSheets
oDrgPrintMgr.AllColorsAsBlack = False
oDrgPrintMgr.SubmitPrint
End If
oDoc.Close (True)

GoTo returnAfterPrint

errHandle:
MsgBox "An error occured: " & Err.Description & ". Error Number:" & Err.Number & ". Exiting Sub..."
End Sub

Function BrowseForFolder(Optional OpenAt As Variant) As Variant
'Function purpose: To Browser for a user selected folder.
'If the "OpenAt" path is provided, open the browser at that directory
'NOTE: If invalid, it will open at the Desktop level
Dim ShellApp As Object
'Create a file browser window at the default folder
Set ShellApp = CreateObject("Shell.Application"). _
BrowseForFolder(0, "Select a folder to print all IDWs in.", 0, "C:")

'Set the folder to that selected. (On error in case cancelled)
On Error Resume Next
BrowseForFolder = ShellApp.self.Path
On Error GoTo 0

'Destroy the Shell Application
Set ShellApp = Nothing

'Check for invalid or non-entries and send to the Invalid error
'handler if found
'Valid selections can begin L: (where L is a letter) or
'\\ (as in \\servername\sharename. All others are invalid
Select Case Mid(BrowseForFolder, 2, 1)
Case Is = ":"
If Left(BrowseForFolder, 1) = ":" Then GoTo Invalid
Case Is = "\"
If Not Left(BrowseForFolder, 1) = "\" Then GoTo Invalid
Case Else
GoTo Invalid
End Select
Exit Function
Invalid:
'If it was determined that the selection was invalid, set to False
BrowseForFolder = False

End Function

'Its a little bit sloppy coding (Sorry! <:) but shuud do the trick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor