- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I am setting up our templates to work with a new PLM system and as part of this I want to have a custom iproperty that reflects the base unit on the part. I have read through similar forum posts and tried to implement the various solutions but I am now stuck. I currently have the script below:
baseUnit = ThisApplication.ActiveDocument.ComponentDefinition.BOMQuantity.Baseunits iProperties.Value("Custom", "Base Unit") = baseUnit
This does work but only when a base unit other than "Each" is selected in the document properties. For example, set base unit to mm:
Run script and view iproperties:
And it works as I want. However if I set the document settings back to the default 'each' (which is what it will be 99% of the time):
Then when I run the iLogic rule I just get blank in the iproperty:
Any help appreciated. Please note I am after the base unit (not quantity). Running inventor 2021 with all available updates.
Thanks in advance.
Solved! Go to Solution.