<?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: iLogic save to PDF and DXF (ask before run) in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-to-pdf-and-dxf-ask-before-run/m-p/7458540#M97098</link>
    <description>&lt;P&gt;Step 1: change ruleFileName to match the name of your rule.&lt;/P&gt;
&lt;P&gt;Step 2: Add this as an external rule.&lt;/P&gt;
&lt;P&gt;Step 3: If using 2018: Add this as an event trigger that occurs on all drawings on save.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not using 2018, it's a much more difficult process and it involves creating an add-in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
   
   Dim oDoc As Document
   oDoc = ThisDoc.Document  

  If isVisible(oDoc) = False Then
      Exit Sub
  End If

  If MsgBox("Export Files?", MsgBoxStyle.YesNo, "MacroMagic") = vbYes
     iLogicVb.RunExternalRule("ruleFileName")
     iLogicVb.RunExternalRule("ruleFileName")
  End if

End Sub

Function isVisible(oDoc As Document) As Boolean
    For Each oVisDoc in ThisApplication.Documents.VisibleDocuments
        If oVisDoc Is oDoc Then
	    Return True
	End If
    Next
    Return False
End Function

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Oct 2017 15:02:37 GMT</pubDate>
    <dc:creator>MechMachineMan</dc:creator>
    <dc:date>2017-10-13T15:02:37Z</dc:date>
    <item>
      <title>iLogic save to PDF and DXF (ask before run)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-to-pdf-and-dxf-ask-before-run/m-p/7458493#M97097</link>
      <description>&lt;P&gt;Dear Inventor users,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I got 2 iLogic rules in my Inventor (save document as .PDF and save as .DXF) and they run when saving a document.&lt;/P&gt;&lt;P&gt;they work perfectly.&lt;/P&gt;&lt;P&gt;They are named:&lt;/P&gt;&lt;P&gt;- Save as DXF&lt;/P&gt;&lt;P&gt;- Save as PDF&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now they are triggered by saving my document.&lt;/P&gt;&lt;P&gt;I would like to have a pop up before running these two rules with a textbox saying yes/no&lt;/P&gt;&lt;P&gt;if yes run both rules, if no do nothing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help me how to make this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 14:48:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-to-pdf-and-dxf-ask-before-run/m-p/7458493#M97097</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-13T14:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save to PDF and DXF (ask before run)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-to-pdf-and-dxf-ask-before-run/m-p/7458540#M97098</link>
      <description>&lt;P&gt;Step 1: change ruleFileName to match the name of your rule.&lt;/P&gt;
&lt;P&gt;Step 2: Add this as an external rule.&lt;/P&gt;
&lt;P&gt;Step 3: If using 2018: Add this as an event trigger that occurs on all drawings on save.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not using 2018, it's a much more difficult process and it involves creating an add-in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub Main()
   
   Dim oDoc As Document
   oDoc = ThisDoc.Document  

  If isVisible(oDoc) = False Then
      Exit Sub
  End If

  If MsgBox("Export Files?", MsgBoxStyle.YesNo, "MacroMagic") = vbYes
     iLogicVb.RunExternalRule("ruleFileName")
     iLogicVb.RunExternalRule("ruleFileName")
  End if

End Sub

Function isVisible(oDoc As Document) As Boolean
    For Each oVisDoc in ThisApplication.Documents.VisibleDocuments
        If oVisDoc Is oDoc Then
	    Return True
	End If
    Next
    Return False
End Function

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 15:02:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-to-pdf-and-dxf-ask-before-run/m-p/7458540#M97098</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-10-13T15:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save to PDF and DXF (ask before run)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-to-pdf-and-dxf-ask-before-run/m-p/7458785#M97099</link>
      <description>&lt;P&gt;Lol, I'm using inventor 2017 and it works.&lt;/P&gt;&lt;P&gt;Thank you very much MechMachineMan&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 16:16:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-to-pdf-and-dxf-ask-before-run/m-p/7458785#M97099</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-13T16:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic save to PDF and DXF (ask before run)</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-to-pdf-and-dxf-ask-before-run/m-p/7459015#M97100</link>
      <description>&lt;P&gt;You mean you can attach event triggers to the individual documents you want this to happen on in 2017 (manually, via CodeInjector, or via templates)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In 2018 there are Global event triggers that make this much easier to manage.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 17:26:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/ilogic-save-to-pdf-and-dxf-ask-before-run/m-p/7459015#M97100</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-10-13T17:26:53Z</dc:date>
    </item>
  </channel>
</rss>

