For some reason, since migrating to Inventor and Vault 2015, when printing .idws from a custom tool that we wrote, the output has no shading on the views.
So in Inventor 2014, you would select a file and hit print, the tool downloads it from vault and prints it using Inventor apprentice.
After moving to 2015, the drawings still print correctly (with shading) in Inventor and Vault, but they come out with no shading when printing using Apprentice Server.
Anyone got any idea why, or whether there is a setting to change this somewhere?
Gavin Bath
MFG / CAM Technical Specialist
Design and Motion Blog
Facebook | Twitter | LinkedIn | YouTube
Solved! Go to Solution.
Solved by adam.nagy. Go to Solution.
Hi Gavin,
Hope the trip home was alright. 🙂
Would you mind pasting the code that does the actual printing?
Also, I assume you experience the same behaviour with all the drawings... ?
Do you have SP1 installed?
Cheers,
Gavin Bath
MFG / CAM Technical Specialist
Design and Motion Blog
Facebook | Twitter | LinkedIn | YouTube
Hi Adam, here is the code I'm using for printing:
private string PrintFile(string filepath, int filesize) { Inventor.ApprenticeServerComponent oAppServ = new Inventor.ApprenticeServerComponent(); WaitForFile(filepath, filesize); string retval = string.Empty; int loopCount = 0; do { loopCount++; //Pause for 1/2 second System.Threading.Thread.Sleep(500); try { Inv.ApprenticeServerDrawingDocument oAppDoc = (Inv.ApprenticeServerDrawingDocument)oAppServ.Open(filepath); Inventor.ApprenticeDrawingPrintManager PrintMgr = null; //Dim lp As Long string idwname = System.IO.Path.GetFileName(filepath); PrintMgr = (Inv.ApprenticeDrawingPrintManager)oAppDoc.PrintManager; string printername = this.cboPrinters.SelectedItem.ToString().Trim(); PrintMgr.Printer = printername; //Set the paper size , scale and orientation PrintMgr.ScaleMode = Inv.PrintScaleModeEnum.kPrintBestFitScale; switch (cboPageSize.Text) { case "A4": PrintMgr.PaperSize = Inv.PaperSizeEnum.kPaperSizeA4; break; case "A3": PrintMgr.PaperSize = Inv.PaperSizeEnum.kPaperSizeA3; break; case "A2": PrintMgr.PaperSize = Inv.PaperSizeEnum.kPaperSizeA2; break; case "A1": PrintMgr.PaperSize = Inv.PaperSizeEnum.kPaperSizeA1; break; case "A0": PrintMgr.PaperSize = Inv.PaperSizeEnum.kPaperSizeA0; break; default: PrintMgr.PaperSize = Inv.PaperSizeEnum.kPaperSizeDefault; break; } switch (optPortrait.Checked) { case true: PrintMgr.Orientation = Inv.PrintOrientationEnum.kPortraitOrientation; break; case false: PrintMgr.Orientation = Inv.PrintOrientationEnum.kLandscapeOrientation; break; default: PrintMgr.Orientation = Inv.PrintOrientationEnum.kDefaultOrientation; break; } PrintMgr.PrintRange = Inventor.PrintRangeEnum.kPrintAllSheets; //Set range for print to sheet no PrintMgr.SubmitPrint(); this.StatusBar1.Text = "Print Submitted for " + idwname; PrintMgr = null; oAppDoc = null; oAppServ = null; retval = string.Empty; //Set loop count so that do will end loopCount = 3; } catch (Exception ex) { retval += "Error printing Try " + loopCount + " File " + SysIO.Path.GetFileName(filepath) + "\n"; this.StatusBar1.Text = retval; this.StatusBar1.Text = ex.ToString(); } } while (loopCount <3); return retval; }
Gavin Bath
MFG / CAM Technical Specialist
Design and Motion Blog
Facebook | Twitter | LinkedIn | YouTube
Hi Gavin,
This took quite a bit of time :-s having completely forgotten about the Apprentice 2015 issue during the holiday and that it could affect printing as well - even though Wayne did mention it in this article: http://adndevblog.typepad.com/manufacturing/2014/09/inventorviewctrlocx-2015-not-displaying-inventor...
Here is the solution:
http://adndevblog.typepad.com/manufacturing/2015/01/print-shaded-view-from-apprentice.html
Cheers,
Aha! Thanks! That's what I needed. I'll do this now.
Gavin Bath
MFG / CAM Technical Specialist
Design and Motion Blog
Facebook | Twitter | LinkedIn | YouTube
I know this thread is old, but I am having this issue and the posted solution does not appear to be working. I have Inventor 2016 and Inventor 2014 installed on my system. Would it be using the Apprentice Svr from 2014?
It depends on which Inventor version was run last.