Anonymous
in reply to:
Anonymous
07-25-2016
07:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-25-2016
07:02 AM
OK, new idea.
Use this ilogic code to create a user parameter called mass and fill that parameter with the mass of the part.
SyntaxEditor Code Snippet
Try Parameter("Mass")=iProperties.Mass Catch oMyParameter=ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters oParameter=oMyParameter.AddByExpression("Mass", "5", "kg") 'oParameter=oMyParameter.AddByValue("Mass", "", UnitsTypeEnum.kKilogramMassUnits) Parameter("Mass")=iProperties.Mass End Try
Then in document settings change the base quantity to the new parameter and bingo!
You can set the rule to run every time you save so the mass always gets updated