Delete external ilogic rule triggers with VBA and Apprentice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
we're having a small problem, in the past we used some external iLogic rules, but not anymore, they don't even exist anymore. I tried to solve this by recreating the external rules, but modified, so that when it gets triggered, it deletes its own triggers from the document.
The problem is, it takes ages until all the files are "cleansed". Most of these old files (over 100k) are hardly ever opened so this doesn't even work on most rarely used files.
So now I'm "scanning" through all the files with a vba macro, using apprentice, and delete all triggers for any external rules.
I'm testing the iLogic event triggers' existence with:
Set iLogicEvents = InvDoc.PropertySets.Item("_iLogicEventsRules") If Err = False Then 'delete external triggers
The problem is, this seems to work fine with IAM files, but never with IPT files. So I'm clearly doing it wrong. 🙂
Maybe useful info: at the time these external rules were used (and triggers added) we were using Inventor 2014. Now we're using 2018. Most of these old files aren't even migrated. Could this be the problem? (Don't think so, I tested the above on 2018 IPT files and it doesn't work with them either.)
Any ideas? Thanks.