10-07-2020
02:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-07-2020
02:45 AM
I'm thinking maybe check if the design doctor has any warnings or errors. (The red plus sign lights up), I'm guessing this is what you mean by "InventorVb.DocumentUpdate() fails". Because the rule doesn't crash, right?
Try this after the update:
'Update document InventorVb.DocumentUpdate() 'Exit if any error or warning occurs. If ThisApplication.ErrorManager.HasErrors Or ThisApplication.ErrorManager.HasWarnings Then Exit Sub
After some testing I see that it behaves as expected if you use ThisDoc.Document.Update, but not if you use InventorVB.DocumentUpdate() for some reason...
So like this insted maybe?
ThisDoc.Document.Update 'Exit if any error or warning occurs. If ThisApplication.ErrorManager.HasErrors Or ThisApplication.ErrorManager.HasWarnings Then Exit Sub
Jhoel Forshav
Download my free Inventor Addin - Hole Projector
LinkedIn | Ideas | Contributions | Blog posts | Website