I recently had a customer request a bit more from the code that I posted on a past blog post. http://inventorbetter.blogspot.com/2010/10/customizing-iproperties-in-inventor.html
In that post I used iLogic to populate a user parameter with the models mass.
Here I am taking that code to the next level and populating a Custom iProperty with lbs and kg.
Create a rule with this code and then assign the event trigger “Part Geometry Change” to the rule.
Round_Mass_lbs = Round(iProperties.Mass, 2)
Round_Mass_kg = Round(iProperties.Mass * 0.45359237, 2)
iProperties.Value("Custom", "Mass") = Round_Mass_lbs & " lbs " & "(" & Round_Mass_kg & " kg)"
And finally here is a example of the results.











Comments