Message 1 of 2
Open a specific version of Inventor using C#
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm new to Inventor API and currently working on a stand-alone application, and I'm writing it in C#. Here is the scenario:
My machine has multiple versions of Inventor installed (2021, 2022 & 2024). And I want to launch a specific version of inventor.
Currently I am using following code to launch inventor:
try
{
inventorApp =(Inventor.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Inventor.Application");
}
catch
{
Type inventorAppType = System.Type.GetTypeFromProgID("Inventor.Application");
inventorApp = System.Activator.CreateInstance(inventorAppType) as Inventor.Application;
}
inventorApp.Visible = false;
Above code launches Inventor 2024 by default but I want to launch Inventor 2021 and it should run as background process.
Please help me out.
Thanks a lot.