
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
What the heck?!!
The 2013 Inventor Viewer PrintToFile(<FileName>) procedurePrints to the printer.and not the file.
2011 worked fine, Same code used. 2013 fails to print to the file, and prints to the printer instead.
Pulling what little hair I have left out over this one.
--- Shortened version of code follows ---
If oView.FileName = "" Then Exit Sub
Dim oDwg As IV.ApprenticeServerDrawingDocument = CType(oView.ApprenticeServerDocument, IV.ApprenticeServerDrawingDocument)
Dim oPrnt As IV.ApprenticeDrawingPrintManager = CType(oView.ApprenticeServerDocument.PrintManager, IV.ApprenticeDrawingPrintManager)
oView.Interactive = False
With oPrnt
.SetCurrentView(oView.ClientView)
.Printer = "PDF File Creator"
'.Printer = "\\SERVER05\Kyocera Mita KM-4035"
Dim oSheet As IV.Sheet = oDwg.Sheets(1)
.SetSheetRange(1, 1)
.PaperSize = InventorApprentice.PaperSizeEnum.kPaperSizeLetter
.Orientation = InventorApprentice.PrintOrientationEnum.kLandscapeOrientation
ScaleMode = IV.PrintScaleModeEnum.kPrintBestFitScale
.PrintToFile("C:\PDF_Home\Sheet-1.ps")
End With
Solved! Go to Solution.