Message 1 of 5
Document Closes Before Addin Can Respond to DocumentClosing Event
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
We want to gather some data and store it in an external database. We are initiating these methods in the DocumentClosing Event Handler.
The problem is that some Documents close before methods are called to gather and save data from the Document.
This behavior seems to happen with small documents used for testing. For large documents, it seems the code has time to execute before the Document is disposed of. Not sure what the tipping point is.
I've thought about initiating a Transaction first thing after the event fires, but this seems wrong, hacky and is not permitted.
Does anyone know how to stall, postpone, or otherwise ask Revit to wait?