<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ApplicationEvents.OnCloseDocument cannot be canceled in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/applicationevents-onclosedocument-cannot-be-canceled/m-p/10968538#M40099</link>
    <description>Think that you can't cancel an event.</description>
    <pubDate>Wed, 23 Feb 2022 22:25:59 GMT</pubDate>
    <dc:creator>bradeneuropeArthur</dc:creator>
    <dc:date>2022-02-23T22:25:59Z</dc:date>
    <item>
      <title>ApplicationEvents.OnCloseDocument cannot be canceled</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/applicationevents-onclosedocument-cannot-be-canceled/m-p/10968203#M40098</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having a problem with my addin on Inventor 2022.2.2:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;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;
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this a bug? How can we flag this to Autodesk ?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 19:37:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/applicationevents-onclosedocument-cannot-be-canceled/m-p/10968203#M40098</guid>
      <dc:creator>yan.gauthier</dc:creator>
      <dc:date>2022-02-23T19:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: ApplicationEvents.OnCloseDocument cannot be canceled</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/applicationevents-onclosedocument-cannot-be-canceled/m-p/10968538#M40099</link>
      <description>Think that you can't cancel an event.</description>
      <pubDate>Wed, 23 Feb 2022 22:25:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/applicationevents-onclosedocument-cannot-be-canceled/m-p/10968538#M40099</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2022-02-23T22:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: ApplicationEvents.OnCloseDocument cannot be canceled</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/applicationevents-onclosedocument-cannot-be-canceled/m-p/10968740#M40100</link>
      <description>&lt;P&gt;Autodesk Documentation about it says that you can:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-A5DA37D6-BA28-46B0-B4AE-B47D3A6A4D1C" target="_blank"&gt;https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=GUID-A5DA37D6-BA28-46B0-B4AE-B47D3A6A4D1C&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This event supports the ability to cancel the close. By setting this argument to kEventCanceled when the BeforeOrAfter argument is kBefore Inventor will abort the close. When the close is cancelled, this event is fired again but the BeforeOrAfter argument will have a value of kAbort.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Feb 2022 01:38:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/applicationevents-onclosedocument-cannot-be-canceled/m-p/10968740#M40100</guid>
      <dc:creator>yan.gauthier</dc:creator>
      <dc:date>2022-02-24T01:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: ApplicationEvents.OnCloseDocument cannot be canceled</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/applicationevents-onclosedocument-cannot-be-canceled/m-p/10996792#M40101</link>
      <description>&lt;P&gt;After corresponding with Autodesk about the issue, they told me that they are making progress understanding the issue, but there is no fix yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apparently, the 3D-Annotation addin might be the culprit here. They say I could disable this addin to fix the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I am using 3D-Annotations, I will wait and hope for a fix in an upcoming update.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 16:05:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/applicationevents-onclosedocument-cannot-be-canceled/m-p/10996792#M40101</guid>
      <dc:creator>yan.gauthier</dc:creator>
      <dc:date>2022-03-10T16:05:45Z</dc:date>
    </item>
  </channel>
</rss>

