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: 

Determine Inventor file version

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Raider_71
1533 Views, 4 Replies

Determine Inventor file version

Hi guys,

 

What would be the easiest way to check an Inventor file version to make sure that the open/openwithoptions methods dont crash if the file version is newer than the current Inventor being used to run the application through.

I run multiple versions of Inventor on my PC and as such have multiple Inventor file versions on my PC. If I try and access/open a file with one of my apps using either the full API or Apprentice, it crashes the app at that point if the file version is newer than what the current Inventor version can handle. I would like to catch this before it gets there.

 

Hope it makes sense and that someone can help.

 

Cheers

4 REPLIES 4
Message 2 of 5

Application.FileManager.SoftwareVersionSaved will get the job done without opening the file.

 

It's only available from Inventor, I don't think there is a way through an Apprentice App.

 

Hope it helps,

Philippe.



Philippe Leefsma
Developer Technical Services
Autodesk Developer Network

Message 3 of 5

Ahhhhhh thats what I was looking for! Thanks a lot!

Message 4 of 5

Hi philippe,

 

I have started implementing this in one of my applications. So for testing purposes I have three versions of Inventor installed on my PC. This is the code I use:

 

Dim oFileMan As Inventor.FileManager
oFileMan = oApp.FileManager
Dim intFileversion As Integer

For Each Filename In OpenFileDialog1.FileNames
intFileversion = FileMan.SoftwareVersionSaved(Filename).Major

...

The above works fine with Inventor 2014 running but crashes Inventor 2013 completely on the last line of code when the file version is actually higher than 2013.

 

Any ideas?

Message 5 of 5
Raider_71
in reply to: Raider_71

Hi philippe,

 

Ok I have loaded Inventor 2013 SP2 plus Update 4 for SP2 and now the problem is gone.

 

I had SP 1.1 loaded before.

 

Thanks

 

Cheers

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

Post to forums  

Autodesk Design & Make Report