I'm trying to figure out how to create an iLogic rule that would create a Custom iProperties and put in what version of Inventor the file was last udpated with.
Does anyone have an idea how I would do this? I'm just learning iLogic so the answer is probably staring me in the face
Dim Volume123 As String Volume123 = Round(iProperties.Volume/100^3, 3)& " L" iProperties.Value("Custom", "MyVolume") = Volume123 Dim Mass123 As String Mass123 = Round(iProperties.Mass, 3) & " KG" iProperties.Value("Custom", "MyMass") = Mass123
I am learning iLogics myself. I don't know how to extract the version number - But as you may be able to see from this, you can write iProperties.Value("Custom", "YourName") = whatever parameter you insert the version number into
That creates a custom iProperty with the name you gave it ("YourName").
I can't figure out how to call the inventor build.. But I imagine it's ThisApplication.Something, at least..
I think the line you almost had was:
oBuild = ThisApplication.SoftwareVersion.DisplayName()
MessageBox.Show(oBuild)
This will work on its own and just report the version, service pack level and build number.
There are other variables you can use:
Introduced in Inventor 4
Dim VersionNumber As String VersionNumber =ThisApplication.SoftwareVersion.DisplayName() iProperties.Value("Custom", "Version") = VersionNumber
So this would be the code to put it into an iProperty?
Aha!
So I don't need to define it as a string in the mass and volume code either?
Is it automatically considered a string when put into an iProperty, or?
I see!
Awesome - I have a lot to learn, but I'm slowly getting there, looking at people's codes 😄