<?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: Macro - Ilogic - Which is the best opton. in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565590#M55025</link>
    <description>you could always try the below to see if it works with assemblies, and just use they keyboard shortcut to access the iTrigger.&lt;BR /&gt;Alt + G + J + K + T + R&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;trigger=iTrigger0&lt;BR /&gt;&lt;BR /&gt;Dim oDoc As Document = ThisApplication.ActiveDocument&lt;BR /&gt;With oDoc&lt;BR /&gt;' .Activate&lt;BR /&gt;.Rebuild&lt;BR /&gt;.Save&lt;BR /&gt;.Close&lt;BR /&gt;End With&lt;BR /&gt;</description>
    <pubDate>Tue, 31 Mar 2015 18:08:29 GMT</pubDate>
    <dc:creator>MechMachineMan</dc:creator>
    <dc:date>2015-03-31T18:08:29Z</dc:date>
    <item>
      <title>Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5563846#M54995</link>
      <description>&lt;P&gt;I am have trouble switching my brain over to inventor after switching from Solidworks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need something very simple, we have 50,000 parts that will not migrate using the task scheduler so wer are manually opening up a handful than go throught the "rebuild" "save" and "close"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have the cose that I could run on all open files -&amp;nbsp; Rebuild-Save and Close&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of these files go back to Beta6&amp;nbsp; &lt;img class="lia-deferred-image lia-image-emoji" src="https://forums.autodesk.com/html/@B4D44A73814D7FC0D950DEDFACB97081/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A little Help qould be great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this Invenotr stuff is a little more stable than SW at the moment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 18:22:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5563846#M54995</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-30T18:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5564148#M55002</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you get code or make it, it will be something super easy like:&lt;/P&gt;&lt;P&gt;HOWEVER, this will go through every document&amp;nbsp;that is visibly open. Erase '.VisibleDocuments' for it to go through all of them.&lt;/P&gt;&lt;P&gt;I haven't tested this, but it should work for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dim oDoc As Document&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Each oDoc in ThisApplication.Documents.VisibleDocuments&lt;/P&gt;&lt;P&gt;If&amp;nbsp;&lt;/P&gt;&lt;P&gt;With oDoc&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;' .Activate&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Rebuild&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Save&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .Close&lt;/P&gt;&lt;P&gt;End with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 21:06:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5564148#M55002</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-03-30T21:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5564152#M55003</link>
      <description>It might require a few runs by the time it works its way up to the top level as it wont necessarily start at the bottom level documents, as it is coded.</description>
      <pubDate>Mon, 30 Mar 2015 21:09:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5564152#M55003</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-03-30T21:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5564188#M55004</link>
      <description>Only need it for single .ipt files. The plan was to open say 20 or 30 at a time.&lt;BR /&gt;&lt;BR /&gt;Sent from my iPhone</description>
      <pubDate>Mon, 30 Mar 2015 21:29:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5564188#M55004</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-30T21:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5564195#M55005</link>
      <description>The .visibledocuments should accomplish that.</description>
      <pubDate>Mon, 30 Mar 2015 21:33:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5564195#M55005</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-03-30T21:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565007#M55011</link>
      <description>&lt;P&gt;Simply reading things usually goes a long way in programming;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ran that code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error stack that came back:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Error on Line 2 : 'If' must end with a matching 'End If'.
Error on Line 2 : Expression expected.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Oh heyyyy. Look, the code doesn't have a matching End If/ The If that is there is useless, so delete it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;For Each oDoc in ThisApplication.Documents.VisibleDocuments

With oDoc
         ' .Activate
          .Rebuild
          .Save
          .Close
End With
 
Next&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And then....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
   at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&amp;amp; msgData)
   at Inventor.AttributeSet.get_Name()
   at iLogic.RuleStorage.RuleInDocumentForEqualsTest.GetHashCode()
   at System.Collections.Generic.ObjectEqualityComparer`1.GetHashCode(T obj)
   at System.Collections.Generic.HashSet`1.InternalGetHashCode(T item)
   at System.Collections.Generic.HashSet`1.Remove(T item)
   at iLogic.RuleAndTriggeredEval.EvalRule()
   at iLogic.RuleEditAndRun.RuleEvaluate(RuleEvalContainer ruleEvalCont)
   at iLogic.EditRuleRunner.RuleModifyAndEval(ILmiRule ruleNodeDef, Boolean&amp;amp; cancelled)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;So yeah something bigger actually is wrong. But it still runs the rebuild/save part. It just doesn't like closing files.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 13:19:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565007#M55011</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-03-31T13:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565193#M55014</link>
      <description>&lt;P&gt;Thanks for the direction,its working but it works on .ipt files only&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 14:55:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565193#M55014</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-31T14:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565273#M55016</link>
      <description>Hmmm. Could need .Save2(True) or .Rebuild2(True) instead of their counterparts.</description>
      <pubDate>Tue, 31 Mar 2015 15:33:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565273#M55016</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-03-31T15:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565363#M55019</link>
      <description>&lt;P&gt;I have done close to 5,000 ipt files this morning, but I was given a list of assemblies too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will need something, but thanks for your input at lunch hour&amp;nbsp;I am going to re-post the code her so others may use.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 16:13:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565363#M55019</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-31T16:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565562#M55022</link>
      <description>&lt;P&gt;Ilogic for Rebuild and Save all .ipt Files&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For&lt;/STRONG&gt; &lt;STRONG&gt;Each&lt;/STRONG&gt; oDoc in &lt;STRONG&gt;ThisApplication&lt;/STRONG&gt;.Documents.VisibleDocuments&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With&lt;/STRONG&gt; oDoc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;' .Activate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Rebuild&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;STRONG&gt;Save&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;STRONG&gt;Close&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End&lt;/STRONG&gt; &lt;STRONG&gt;With&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Next&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 17:59:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565562#M55022</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-31T17:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565565#M55023</link>
      <description>&lt;P&gt;Stil cant figure out why it wont with assembly or drawing files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any clue&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 18:00:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565565#M55023</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-31T18:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565590#M55025</link>
      <description>you could always try the below to see if it works with assemblies, and just use they keyboard shortcut to access the iTrigger.&lt;BR /&gt;Alt + G + J + K + T + R&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;trigger=iTrigger0&lt;BR /&gt;&lt;BR /&gt;Dim oDoc As Document = ThisApplication.ActiveDocument&lt;BR /&gt;With oDoc&lt;BR /&gt;' .Activate&lt;BR /&gt;.Rebuild&lt;BR /&gt;.Save&lt;BR /&gt;.Close&lt;BR /&gt;End With&lt;BR /&gt;</description>
      <pubDate>Tue, 31 Mar 2015 18:08:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565590#M55025</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-03-31T18:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Macro - Ilogic - Which is the best opton.</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565592#M55026</link>
      <description>&lt;P&gt;Also, Rebuild does not work on drawing files. Best you can do it .Update. Which might be what fixes the other issue for you anyways.&lt;BR /&gt;&lt;BR /&gt;so&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For&lt;/STRONG&gt; &lt;STRONG&gt;Each&lt;/STRONG&gt; oDoc in &lt;STRONG&gt;ThisApplication&lt;/STRONG&gt;.Documents.VisibleDocuments&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If oDoc.DocumentType() =&amp;nbsp;kAssemblyDocumentObject Or kDrawingDocumentObject&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With&lt;/STRONG&gt; oDoc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;' .Activate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'.Rebuild&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;.Update&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;STRONG&gt;Save&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;STRONG&gt;Close&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End&lt;/STRONG&gt; &lt;STRONG&gt;With&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Else&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With&lt;/STRONG&gt; oDoc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;EM&gt;' .Activate&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.Rebuild&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;'&lt;STRONG&gt;.Update&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;STRONG&gt;Save&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;STRONG&gt;Close&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End&lt;/STRONG&gt; &lt;STRONG&gt;With&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;End if&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Next&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Mar 2015 18:13:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/macro-ilogic-which-is-the-best-opton/m-p/5565592#M55026</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-03-31T18:13:09Z</dc:date>
    </item>
  </channel>
</rss>

