09-27-2021
04:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-27-2021
04:32 AM
Hi @emanuel.c. Within your 'getstock' function, you are checking 'smCompDef.HasFlatPattern' several lines after you have already attempted to extract data from the FlatPattern with the 'SheetMetal.FlatExtentsLength' & 'SheetMetal.FlatExtentsWidth' lines. This is obviously not proper logic. You should be checking for the existence of a FlatPattern before trying to use it or extract data from it. Then, if not found, either include some code (like Unfold) to create the FlatPattern before trying to access it, or avoid attempting to access it at all. Because when you try to access/use it, and it doesn't exist yet, it will throw an error. Just one observation.
Wesley Crihfield
(Not an Autodesk Employee)