- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Drawing "Update" event
I'm trying to hook up some custom actions to the "Update Drawing" event, so they happen immediately after a drawing is updated. I can easily watch for manual updates and respond to those. The problem is, Inventor also automatically updates drawings after certain actions, such as opening or activating an out-of-date drawing. I can't figure out how to watch for these automatic Updates.
I tried watching the "OnDocumentChange" event, but this event isn't triggered by Inventor's automatic updates.
I could easily check for an OnOpenDocument or OnActivateDocument event, but these don't tell me whether the drawing is going to be updated as part of the open/activate or not, and I don't want my code running unless an Update is actually happening.
My last idea was to check the "DrawingDocument.RequiresUpdate" property BEFORE an open/activate event and again AFTER it, and if "RequiresUpdate" changed from True to False, then the drawing was updated. Surprisingly, this worked for the OnActivateDocument event. However, "RequiresUpdate" always returns False inside of the "OnOpenDocument" event. So I can't tell if a drawing was updated during opening.
So, my questions:
- Is there a simple, fool-proof way to watch for the "automatic drawing update" event?
- If not, is there a way to determine if an Update is going to happen during a drawing Open event, since "RequiresUpdate" always returns False during an open?