Reading and Comparing build versions

Reading and Comparing build versions

mrB_Young
Advocate Advocate
310 Views
2 Replies
Message 1 of 3

Reading and Comparing build versions

mrB_Young
Advocate
Advocate

Hi,

How can I leverage iLogic to pull the different build versions of Inventor files so that I can further use it in iLogic code?

mrB_Young_0-1683458348629.png
I need to pull the "Created with" build , so that I can compare it to either "Last update with" build or the build version of the actual software being used.
It is enough just to have 2021.1 & 2023.2 - I don't need to full build number, but if full build number, that's OK.

If I use this:

buildNumber = ThisDoc.Document.SoftwareVersionCreated
    
MsgBox("File build version: " & buildNumber)

Then I get this error:
The and operator is not defined for the string Part file build version: and the type SoftwareVersion.

 

If I use this:

Dim buildNumber As String
buildNumber = ThisDoc.Document.SoftwareVersionCreated
    
MsgBox("File build version: " & buildNumber)

I get this:

mrB_Young_2-1683458765980.png

 

 

 

 

Inventor user since 2009
Vault user since 2010
0 Likes
Accepted solutions (1)
311 Views
2 Replies
Replies (2)
Message 2 of 3

JelteDeJong
Mentor
Mentor
Accepted solution

SoftwareVersionCreated is of the type SoftwareVersion. You probably want one of the properties of that type. try something like this:

Dim doc As Document = ThisDoc.Document
Dim softwareVersionCreated As SoftwareVersion = doc.SoftwareVersionCreated


MsgBox(softwareVersionCreated.DisplayVersion)
' Or
MsgBox(softwareVersionCreated.BuildIdentifier)

 

 

Jelte de Jong
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.

EESignature


Blog: hjalte.nl - github.com

Message 3 of 3

mrB_Young
Advocate
Advocate

Ahh,  I see now. Thank you  🙂

Inventor user since 2009
Vault user since 2010
0 Likes