Hi
I am having an issue with Inventor after a recent service pack update. Previously, I could run my application and it would start the correct inventor version (2015). If inventor was already running, it would connect to it. This is managed with this code-
Try _invApp = Marshal.GetActiveObject("Inventor.Application") Catch ex As Exception Try Dim invAppType As Type = _ GetTypeFromProgID("Inventor.Application") _invApp = CreateInstance(invAppType) _invApp.Visible = True 'Note: if you shut down the Inventor session that was started 'this(way) there is still an Inventor.exe running. We will use 'this Boolean to test whether or not the Inventor App will 'need to be shut down. _started = True Catch ex2 As Exception MsgBox(ex2.ToString()) MsgBox("Unable to get or start Inventor") End Try End Try Try m_oServer = New Inventor.ApprenticeServerComponent AddInventorPath() Catch ex As Exception End Try
Now, it is doing 2 irregular things-
1. even though I have no reference to inventor 2017, it starts inventor 2017 and not 2015. I am referencing V19 interop only
2. if Inventor is running, a brand new instance of inventor is created with NO SETTINGS. There are no projects available either. its like a brand new install version..
How can i
A. get the correct version I need to open
B. Stop this new instance being created and hook into the currently open inventor version?
Cheers
Nacho
Nacho
Automation & Design Engineer
Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC
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.
Following these threads, it looks like there is no easy way of getting the specific version. Can I ask why you need a specific version anyways?
https://www.experts-exchange.com/questions/28473521/How-do-you-specify-the-version-of-access-to-use-...
Also, to get the active object/create a new one, look into using the vb.net GetObject() Function
ie;
GetObject("", "Inventor.Application")
and
GetObject(, "Inventor.Application")
Hi
Thanks for the reply. Reason for a specific version is:
My client Company have not yet moved on from 2015 although, 2 people have 2016 installed and as we all know, there is no backward compatibility for files so if 2016 edits and saves anything (which it will through the application), the remaining 2015 users will no longer be able to access those parts.
I will try your suggestion and report back
Cheers
Nacho
Nacho
Automation & Design Engineer
Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC
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.
Easier said than done mate.
the bigger issue is preventing a new instance of Inventor opening everytime the application runs. Oddly enough, it doesn't behave this way when I run from VS in debug. It only behaves like this when I compile it into an executable and run it independently...
Cheers
Nacho
Nacho
Automation & Design Engineer
Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC
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.
Bump!
I realize this thread is a year and half old, but I'm having a similar (not exact, but close enough) problem and don't see a resolution.
Hi
Yes the solution to my issue was that the installer i was creating was set as administrator only. When i changed this, it resolved itself.
If you right click on the inventor shortcut and run as administrator, it will be like a brand new version as its not set up fort specific user (unless of course you set it up like that in the first place.
The standard install of Inventor is per user and all of the settings are per user also
hope that helps 🙂
Nacho
Automation & Design Engineer
Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC
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.
have you changed the reference to the Inventor.Interop? it need to match the current version of Inventor.
you can find it here:
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Autodesk.Inventor.Interop\v4.0_22.0.0.0__d84147f8b4276564
Nacho
Automation & Design Engineer
Inventor automation Programmer (C#, VB.Net / iLogic)
Furniture, Sheet Metal, Structural, Metal fab, Tradeshow, Fabrication, CNC
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.
Can't find what you're looking for? Ask the community or share your knowledge.