Message 1 of 11
"ThisBOM: Could not find the part number"

Not applicable
08-12-2016
09:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to gather part quantities from the BOM via iLogic so that I can apply pricing via code. I have used the iLogic snippet:
quantity = ThisBOM.CalculateQuantity("Model Data", partNumber)
... but it only works on parts that Inventor names automatically. If I enter a Part Name via iProperties or use iLogic to dynamically generate a part number, I get the error:
Error in rule: myRule, in document: My Assembly.iam
ThisBOM: Could not find the part number "100001" in the BOM.
The code works in all virtual components though. Anyone know how to get around this?
Thanks!