iLogic exit rule on failed Assembly update
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there possibility to exit the ilogic rule when InventorVb.DocumentUpdate() fails?
I am working on large assembly file. There are points of base component, to which I am constraining Parts. Part has two points and I am constraining it to two points of base component. Then I move to another part and constrain it to another two points of base component.
I am able to do this via iLogic Rule using For Each Item In oAsmCompDef.Occurrences.AllReferencedOccurrences(oAsmCompDef) where oAsmCompDef is ThisApplication.ActiveDocument.ComponentDefinition. In for cycle there are created constraints to one part.
After constraints are created inside this cycle I update assembly via InventorVb.DocumentUpdate(). However if there is error because of wrong point definition in base component, the rule continues and in next component there is error too. When errors are cumulating, it is painfully slow. Also if I update assembly not in rule but after the rule runs, it is also painfully slow. Is there possibility to exit the rule vhen InventorVb.DocumentUpdate() fails?