Message 1 of 9
ClientView in Inventor Apprentice 2015 & 2016 don't work

Not applicable
06-17-2016
12:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I have used the code below to show the ipt and iam file on the PictureBox in winform.
It works properly for Inventor 2014, but doesn't work for 2015, 2016.
The exception message is "Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))".
Really appreciate for any helps.
ApprenticeServerComponent serverComp = new ApprenticeServerComponent(); string FullFileName = "Part1.ipt" // file path here ApprenticeServerDocument serverDoc = serverComp.Open(FullFileName); ClientView oClientView = serverDoc.ClientViews.Add(pictureBox1.Handle.ToInt32()); // show model on pictureBox1
// Settings oClientView.DisplayMode = DisplayModeEnum.kShadedWithEdgesRendering; Camera oCamera = oClientView.Camera; oCamera.ViewOrientationType = ViewOrientationTypeEnum.kIsoTopRightViewOrientation; oCamera.Perspective = false; oCamera.Fit(); oCamera.Apply(); // =========
oClientView.Update(false); // The pictureBox shows the file here but get an error if version 2015 or 2016.