<?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: If Save() command is used in iLogic, Event Triggers do not work properly (bug?) in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10137266#M52390</link>
    <description>&lt;P&gt;Because of the TRUE value in the save option. This will skip the messages.&lt;/P&gt;
&lt;P&gt;Furthermore the msgbox is outside the if function.&lt;/P&gt;</description>
    <pubDate>Sun, 07 Mar 2021 20:27:43 GMT</pubDate>
    <dc:creator>bradeneuropeArthur</dc:creator>
    <dc:date>2021-03-07T20:27:43Z</dc:date>
    <item>
      <title>If Save() command is used in iLogic, Event Triggers do not work properly (bug?)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10136355#M52389</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I came across a problem (bug?), if I use "Save()" command in iLogic, Event Triggers do not work properly (are not executed fully - exited?).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are using Inventor 2020.3.4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to simulate this problem:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create IPT and its IDW.&lt;/LI&gt;&lt;LI&gt;Create an iRule:&lt;BR /&gt;&lt;PRE&gt;&lt;SPAN style="color: #008cff;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #000000;"&gt;Document&lt;/SPAN&gt;.&lt;SPAN style="color: #000000;"&gt;DocumentType&lt;/SPAN&gt; = &lt;SPAN style="color: #000000;"&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #000000;"&gt;kDrawingDocumentObject&lt;/SPAN&gt;
	&lt;SPAN style="color: #000000;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #000000;"&gt;ModelDocument&lt;/SPAN&gt;.&lt;SPAN style="color: #000000;"&gt;Save&lt;/SPAN&gt;()
&lt;SPAN style="color: #008cff;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #008cff;"&gt;If&lt;/SPAN&gt;

&lt;SPAN style="color: #000000;"&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN style="color: #000000;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #000000;"&gt;FileName&lt;/SPAN&gt;(&lt;SPAN style="color: #008cff;"&gt;True&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;Put this iRule inside "Before Save" Event Trigger (All Documents).&lt;/LI&gt;&lt;LI&gt;Dirty both of the files (for example change dimension on IPT and go to IDW).&lt;/LI&gt;&lt;LI&gt;Save from IDW.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Outcome:&lt;/P&gt;&lt;P&gt;It will only show IDW messagebox.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ReneRepina_0-1615106207490.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/889710i5F339B9EA005CAEA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ReneRepina_0-1615106207490.png" alt="ReneRepina_0-1615106207490.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other try:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Do the same as above, but comment the save command:&lt;BR /&gt;&lt;PRE&gt;&lt;SPAN style="color: #008cff;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #000000;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #000000;"&gt;Document&lt;/SPAN&gt;.&lt;SPAN style="color: #000000;"&gt;DocumentType&lt;/SPAN&gt; = &lt;SPAN style="color: #000000;"&gt;DocumentTypeEnum&lt;/SPAN&gt;.&lt;SPAN style="color: #000000;"&gt;kDrawingDocumentObject&lt;/SPAN&gt;
	&lt;SPAN style="color: #008000;"&gt;'ThisDoc.ModelDocument.Save()&lt;/SPAN&gt;
&lt;SPAN style="color: #008cff;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #008cff;"&gt;If&lt;/SPAN&gt;

&lt;SPAN style="color: #000000;"&gt;MsgBox&lt;/SPAN&gt;(&lt;SPAN style="color: #000000;"&gt;ThisDoc&lt;/SPAN&gt;.&lt;SPAN style="color: #000000;"&gt;FileName&lt;/SPAN&gt;(&lt;SPAN style="color: #008cff;"&gt;True&lt;/SPAN&gt;))&lt;/PRE&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Outcome:&lt;/P&gt;&lt;P&gt;It will show IDW messagebox first, then Save dialog (both yes and click OK) and it will also show IPT messagebox.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ReneRepina_1-1615106335961.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/889711i3553FA619D19E11D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ReneRepina_1-1615106335961.png" alt="ReneRepina_1-1615106335961.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ReneRepina_2-1615106345802.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/889712i9348FCCCD2869171/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ReneRepina_2-1615106345802.png" alt="ReneRepina_2-1615106345802.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ReneRepina_3-1615106350994.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/889713i9C96D43DE541A48C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ReneRepina_3-1615106350994.png" alt="ReneRepina_3-1615106350994.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why does Save() command skip execution of further code? Error or exited or as designed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rene Repina&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Mar 2021 09:01:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10136355#M52389</guid>
      <dc:creator>ReneRepina</dc:creator>
      <dc:date>2021-03-07T09:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: If Save() command is used in iLogic, Event Triggers do not work properly (bug?)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10137266#M52390</link>
      <description>&lt;P&gt;Because of the TRUE value in the save option. This will skip the messages.&lt;/P&gt;
&lt;P&gt;Furthermore the msgbox is outside the if function.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Mar 2021 20:27:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10137266#M52390</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2021-03-07T20:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: If Save() command is used in iLogic, Event Triggers do not work properly (bug?)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10141185#M52391</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/473476"&gt;@bradeneuropeArthur&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do not understand what you mean by "TRUE value".&lt;/P&gt;&lt;P&gt;It is strange that if you use Save() command, further code is not executed. Or is it the logic like, that it executes "Before Save", but if file is saved in between the code, it exits it?&lt;/P&gt;&lt;P&gt;I know msgbox is outside, it is on purpose, to see the outcomes. As you can see when model is saved, it does not executes to msgbox, because it exits it before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an example why I need this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I modify IPT and IDW.&lt;/LI&gt;&lt;LI&gt;I save from IDW.&lt;/LI&gt;&lt;LI&gt;Because I changed IPT (IDW data is depended on it), I want IPT to run "Before Save" iRules and be saved.&lt;/LI&gt;&lt;LI&gt;After IPT saving and updating, IDW would have good data.&lt;/LI&gt;&lt;LI&gt;Because IPT "Before Save" iRule exists before it does the updates, IDW has bad data.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Tue, 09 Mar 2021 07:16:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10141185#M52391</guid>
      <dc:creator>ReneRepina</dc:creator>
      <dc:date>2021-03-09T07:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: If Save() command is used in iLogic, Event Triggers do not work properly (bug?)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10141252#M52392</link>
      <description>&lt;P&gt;With the true after the save I mean this:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Public Sub main
	
If ThisDoc.Document.DocumentType = DocumentTypeEnum.kDrawingDocumentObject
	ThisDoc.ModelDocument.Save2(true)
End If

MsgBox(ThisDoc.FileName(True))

End Sub&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This works as you need it!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 07:58:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10141252#M52392</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2021-03-09T07:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: If Save() command is used in iLogic, Event Triggers do not work properly (bug?)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10141272#M52393</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/473476"&gt;@bradeneuropeArthur&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also tried Save2(True), but it also does not work. Event Trigger on IPT is not executed in this case. If you comment it, it executes it.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 08:08:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10141272#M52393</guid>
      <dc:creator>ReneRepina</dc:creator>
      <dc:date>2021-03-09T08:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: If Save() command is used in iLogic, Event Triggers do not work properly (bug?)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10141308#M52394</link>
      <description>&lt;P&gt;You are right!&lt;/P&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/486618"&gt;@johnsonshiue&lt;/a&gt;&amp;nbsp;could you investigate this with your development team?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 08:25:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/10141308#M52394</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2021-03-09T08:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: If Save() command is used in iLogic, Event Triggers do not work properly (bug?)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/11848868#M52395</link>
      <description>&lt;P&gt;Greetings everybody.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to fill everybody with updated informations about this case.&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12540813"&gt;@Olena.Rubin&lt;/a&gt;&amp;nbsp;from Autodesk support&amp;nbsp;and her team found out that above case is a defect. It is probably not iLogic related, but a general Inventor issue when saving model and its drawing from the drawing directly.&lt;/P&gt;&lt;P&gt;Tracking ID is INVGEN-&lt;SPAN&gt;66198 (see below link) and escalation ID is&amp;nbsp;&lt;SPAN class=""&gt;INVGEN-66301.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link to article:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Mass-and-other-properties-do-not-update-if-the-Inventor-Part-and-Drawing-were-saved-from-Drawing-browser.html" target="_blank" rel="noopener"&gt;https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Mass-and-other-properties-do-not-update-if-the-Inventor-Part-and-Drawing-were-saved-from-Drawing-browser.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Rene Repina&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2023 18:12:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/if-save-command-is-used-in-ilogic-event-triggers-do-not-work/m-p/11848868#M52395</guid>
      <dc:creator>ReneRepina</dc:creator>
      <dc:date>2023-03-26T18:12:35Z</dc:date>
    </item>
  </channel>
</rss>

