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: 

API to detect which version of Autodesk Inventor has been launched

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Sanjay.Gangadhara
992 Views, 3 Replies

API to detect which version of Autodesk Inventor has been launched

Hi there,

 

I'm looking for an API function which would identify the version of Autodesk Inventor that has been launched. The code I"m using to start Inventor is:

 

CLSID clsid;
HRESULT hres = NOERROR;
CoInitialize(NULL);
hres = CLSIDFromProgID(OLESTR("Inventor.Application"), &clsid);
if (hres == S_OK)
	{
	hres = aiApp.CoCreateInstance(clsid, NULL, CLSCTX_LOCAL_SERVER);
	if (hres == S_OK) aiApp->Visible = VARIANT_FALSE;
	}

 

Thanks!

Tags (1)
3 REPLIES 3
Message 2 of 4

You can all of the version information directly under the application API.

 See below examples:

 

ThisApplication.SoftwareVersion.DisplayVersion

ThisApplication.SoftwareVersion.BuildIdentifier

ThisApplication.SoftwareVersion.DisplayName

 

You can use Visual Basic Object browser to find all of the API commands.

Message 3 of 4

That does it - thank you!

Message 4 of 4

Sanjay, if this solves you problem please accept it as the solution to make it easier for people with the same problem to see that it has a solution.

 

Thanks, Matt.

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

Post to forums  

Autodesk Design & Make Report