Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am having a problem with my addin on Inventor 2022.2.2:
I subscribre to this the OnCloseDocument event, my code steps into it. set the HandlingCode to kEventCanceled, but then Inventor still fires the kAfter event instead of kAbort and closes the document...
private void ApplicationEvents_OnCloseDocument(_Document DocumentObject, string FullDocumentName, EventTimingEnum BeforeOrAfter, NameValueMap Context, out HandlingCodeEnum HandlingCode)
{
if (BeforeOrAfter == EventTimingEnum.kBefore)
{
HandlingCode = HandlingCodeEnum.kEventCanceled;
}
else
{
HandlingCode= HandlingCodeEnum.kEventHandled;
}
}
Is this a bug? How can we flag this to Autodesk ?
Solved! Go to Solution.