Hi,
I'm fairly new with Inventor and Inventor programming. As a documentalist I will use Inventor Publisher for illustrations (arriving in a few weeks), but I need an automized way of getting images of individual parts and assemblies when necessary. I'm working on small prototypes to test possibilities like extracting (thumbnail) images of parts. I installed Inventor View 2015 and Visual Studio 2013 and tried added the "Autodesk Inventor View Control". VS added the references "AxInventorViewControllib", "InventorApprentice" and "InventorViewControlLib" automatically after dragging the toolbox component into the Windows form. Without any coded added to the project I immediately run into problems. It seems the Inventor Apprentice DLL file cannot be found. I know from forums and previous experience that this functionallity often doesn't work. I'm not sure if it is incompatibility between VS2013 and View 2015 or something else. I tried registering and unregistering the InventorViewCTRL.ocx, and even the 32bit in combination with 32bit CPU in VS. I can't find the needed dll on my system, but still VS doesn't give errors in the references screen.
The error can be seen in the attachment.
Hi,
Seems there is a problem that the VS does not copy the compiled Interop.InventorApprentice.dll to the Bin folder when you run/debug the probject. Our dev is looking into this.
A workaround for now is after your compilation you can find the Interop.InventorApprentice.dll from the folder like obj\x86\Debug\, copy the Interop.InventorApprentice.dll to the folder like Bin\Debug\ where your executable is located, and then run your executable to check if the problem solves.
Hope this helps.
To avoid manually copy the Interop.InventorApprentice.dll, you can do a change in the VS, i.e. select the Interop.InventorApprentice.dll in the References, and in its Properties change its "Embed Interop Types” to False, and then change the "Copy Local" to True.
Hi Yuhanzhang,
Many thanks. I fixed the problem with your suggestions. I still have problems with the program but not the code. I have no more errors or warnings in VS, but only sometimes when running the code.
Most times when I pick a file and load into the Inventor view control using the filename attribute, the view stays grey but shows the Inventor View controls. Occasionaly I get A file cannot be found error regarding file adskassetapi_new-2.5.dll. I'm using .Net 4.5, but that hasn't given me errors.
When I load assemblies I sometimes get an error of a missing part file that can't be found. The Iventor View Control is doing something, but the View stays grey.
Here's an image with IPT or IAM loaded. Is there any API documentation about implementing this control, newer than on this site:?
http://modthemachine.typepad.com/my_weblog/2013/03/inventor-api-training-lesson-12.html
Can you open the data with Inventor View(InventorView.exe) without any problem? Or the same problem like the ActiveX control does?
When you see the error adskassetapi_new-2.5.dll is missing, is the data last saved by Inventor 2012?
Inventor View itself works perfect with all files.
Our company yearly upgrades all Inventor suits, so we have lots of parts made by different Inventor versions.
Is it convenient for you to provide the data to us so we can reproduce the problem here?
Hi Carl,
The issue is fixed in Inventor 2016. For Inventor 2015 you can copy the attached DLLs to "C:\Program Files\Autodesk\Inventor 2015\Bin\Bin32" folde to solve the problem.
Hope this helps.