Message 1 of 5
Print Sheets with Different Orientation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Evening all
I have the following rule that prints all the drawings that are open to my printer. This works great but if you have a drawing with 2 or more sheets that are in different Orientation all the sheets in that drawing print in the Orientation that the 1st sheet is.
Can anyone please let me know where I am going wrong. As you see I can get the rule to recognize the correct orientation of each sheet but still prints all of them the same as the 1st sheet.
Donald
'NumberCopies = InputBox("Enter Number of Copies", "Print Manager", "1") Dim oDrawDoc As Inventor.Document Dim SheetOrientation As String For Each oDrawDoc In ThisApplication.Documents.VisibleDocuments If (oDrawDoc.documenttype = kDrawingDocumentObject) Then 'Found a drawing Dim oSheet As Sheet For Each oSheet In oDrawDoc.Sheets oSheet.Activate SheetOrientation = ThisApplication.ActiveDocument.ActiveSheet.Orientation Dim oPrintMgr As PrintManager oPrintMgr = oDrawDoc.PrintManager Dim sMyPrinter As String sMyPrinter = "\\AWE-SVR-01\KONICA MINOLTA C284 PCL" oPrintMgr.Printer = sMyPrinter oPrintMgr.ColorMode = kPrintDefaultColorMode oPrintMgr.PrintRange = kPrintAllSheets If SheetOrientation = "10242" Then ' Sheet is Landscape oPrintMgr.Orientation = kLandscapeOrientation MessageBox.Show("Landscape", "Title") Else If SheetOrientation = "10243" Then ' Sheet is Portrait oPrintMgr.Orientation = kPortraitOrientation MessageBox.Show("Portrait", "Title") End If 'oPrintMgr.Orientation = kOrientation oPrintMgr.Scale = kPrintBestFitScale oPrintMgr.PaperSize = kPaperSizeB 'oPrintMgr.NumberOfCopies = NumberCopies 'MessageBox.Show("Printed " & NumberCopies, "Title") 'oPrintMgr.SubmitPrint Next End If Next ActiveSheet = ThisDrawing.Sheet("Sheet:1")