As the subject line says, when multiple instances of Inventor are open on the same machine, the addin will only show in the first one. I do not see any errors generated and tried many approaches. I tried to use the ribbon\tab\pannel\control
created by the first instance. Or in every subsequent instance of Inventor to delete the existing ribbon\tab\pannel\control, and recreate them from scratch. Both approaches did not work.
Has anyone seen this?
Solved! Go to Solution.
Solved by LiamSmith2. Go to Solution.
Hi,
So far I am unable to reproduce the issue, my custom addins are getting loaded fine in multiple instances of Inventor and ribbon items are present in each of them.
Without more context, it will be very hard to help you further. Please consider providing a minimal buildable sample of your addin source code and specify which version of Inventor/OS you are working with.
Thank you,
Philippe.
Thank you, Philippe. I was able to find the root cause of this issue. Our addin now shows in all simulataneusly open instances of Inventor.
I changed how I create a reference to the currently running Inventor app:
from:
var oApp = (Application)Marshal.GetActiveObject("Inventor.Application");
to:
var m_InventorApp = addInSiteObject.Application;
Yes, you should always retrieve the Inventor.Application object from the addinSite when running the code from an addin.
The GetActiveObject API does not support multiple instances of an application. It will always return the first instance.
I'm glad you could solve your issue.
Regards,
Philippe.