ClientView in Inventor Apprentice 2015 & 2016 don't work

ClientView in Inventor Apprentice 2015 & 2016 don't work

Anonymous
Not applicable
724 Views
8 Replies
Message 1 of 9

ClientView in Inventor Apprentice 2015 & 2016 don't work

Anonymous
Not applicable

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.

 

 

 

0 Likes
725 Views
8 Replies
Replies (8)
Message 2 of 9

NachoShaw
Advisor
Advisor

did you ever resolve this?

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
Message 3 of 9

johnsonshiue
Community Manager
Community Manager

Hi! Could you take a quick look at the following thread and see if it applies to you?

 

https://forums.autodesk.com/t5/inventor-customization/apprentice-clientview/td-p/7173085

 

Many thansk!



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 4 of 9

NachoShaw
Advisor
Advisor
Hi Johnson

Thanks for the reply. I have already tried that as I found the thread yesterday. I cannot get the project to work and get an error with same code.

It used to work on my machine amd my previous application, just doesn't work anymore

I'm happy to supply a test project



Thanks

Nacho

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
Message 5 of 9

johnsonshiue
Community Manager
Community Manager

Hi! What release of Inventor are you on? 2018?

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 6 of 9

NachoShaw
Advisor
Advisor
Hi

Here's my spec

Inventor
Windows 10 64 bit
Visual studio
.net framework 4.5.2


Thanks

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
Message 7 of 9

johnsonshiue
Community Manager
Community Manager

Hi! I am asking you what Inventor release you are on. 2018 or 2017?

Many thanks!

 



Johnson Shiue (johnson.shiue@autodesk.com)
Software Test Engineer
0 Likes
Message 8 of 9

NachoShaw
Advisor
Advisor
Sorry, I did type 2017 but my phone tends to think its smarter than me sometimes....

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes
Message 9 of 9

NachoShaw
Advisor
Advisor
Hi

For clarity, I am on build 256, release 2017.4.2


Thanks

Nacho
Automation & Design Engineer

Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC

EESignature


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


0 Likes