Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

InventorViewCtrl.ocx error - system.outofmemoryexception

1 REPLY 1
Reply
Message 1 of 2
Anonymous
455 Views, 1 Reply

InventorViewCtrl.ocx error - system.outofmemoryexception

Hello, 

I am developing a custom-made ERP system, where I want to show assembly and part previews from Inventor. 

 

I am using InventorViewCtrl.ocx activeX component for it. However it is only working on my computer (where I have also Visual Studio Installed). 

 

On every other computer, where my application is deployed (AnyCPU), I get system.outofmemoryexception error. Did you every encounter this error with this ocx? How to handle it? If I disable code that is loading files into the ocx, then everything is working fine. 

 

I have a second question, too. Am I able to register InventorViewCtrl.ocx without installing autodesk inventor view on client machine? If I try to do so in SysWOW64 folder, I get error: The module "InventorViewCtrl.ocx" failed to load. Make sure the binary is stored at the specified path or debug it to check for problems with  the binary or dependent .dll files. ( I always take the ocx file from bin32 folder)

 

If I take another route and I want to set inventorapprentice and other references to isolated, I get commonlib.dll is missing error, which I cannot add as a reference because dll entry point is missing. I also tried to sign the dll's, because they are do not have a strong name (another error), but I also got some kind of error with inventorapprentice. 

 

The above text  is just for description of the strugle that I have already gone through. 

 

The simple question is: How can I use AutodeskInventorView control in my custom application (written in VB.net), so that I can display inventor files to my colleagues without installing inventorView and get it working without the system.outofmemoryexception error or missing dependant dlls errors. Currently, on every machine autodeskInventorView is already installed, because I could not get it work without it, but I always get system.outofmemoryexception error. 

 

Any help would be greatly appreciated. 

 

Thank you.  

 

 

 

1 REPLY 1
Message 2 of 2
billhashton
in reply to: Anonymous

I'm having a similar issue with C# and Visual Studio 2022.

 

On my work system, we are still using windows 10, but worse, stuck on 2018 for now.

My home system (Win 11 and VS 2022), I downloaded Inventor 2025 and didn't see the InventorViewCtrl.ocx from the install or in the samples.

I did try some of the older samples and have the same errors on my home system as on my work.

 

These applications worked before, but now that I found a use for them, I no longer have the compiled executables to test.

 

Diggin deeper, I found that the kernalbase.dll was throwing an error. I would believe that the fileopen() method is being blocked for security vulnerabilities. 

Big question is if the support for the ActiveX Viewer is going away, is there a method to replace it functionally in an Inventor Apprentice application?

kernelbase error.png

 

From the Call Stack:

System.OutOfMemoryException
HResult=0x8007000E
Message=Exception of type 'System.OutOfMemoryException' was thrown.

Bill Ashton
Autodesk Certified Professional in Inventor
for Mechanical Design (ADSK-157-1022)
Master Technician Eng. COD

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report