<?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: Run external iLogic on event in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6963915#M102294</link>
    <description>&lt;P&gt;did you know about the code injector?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://beinginventive.typepad.com/being-inventive/2012/02/injecting-ilogic-code-and-ilogic-event-triggers-automatically.html" target="_blank"&gt;http://beinginventive.typepad.com/being-inventive/2012/02/injecting-ilogic-code-and-ilogic-event-triggers-automatically.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 22 Mar 2017 10:40:02 GMT</pubDate>
    <dc:creator>HermJan.Otterman</dc:creator>
    <dc:date>2017-03-22T10:40:02Z</dc:date>
    <item>
      <title>Run external iLogic on event</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6963619#M102293</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to create an addin which runs an external ilogic rule at a specified event. I know this can be done with the standard iLogic triggers, but this doesn't apply to files already created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: I want my external rule&amp;nbsp;Start.iLogicVb to run on Before Save Document (or any other event)&lt;/P&gt;&lt;P&gt;I want it to run every time i save the active document (initial and save as)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried MuM - iLogic Run on Save ( &lt;A href="http://inventortrenches.blogspot.fi/2011/08/built-for-speed-running-ilogic-rules.html" target="_blank"&gt;http://inventortrenches.blogspot.fi/2011/08/built-for-speed-running-ilogic-rules.html&lt;/A&gt; ) but it does not let me specify which event i would like to use, and it does not run on the&amp;nbsp;initial save of a new file or save as.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I only know the basics of iLogic and no other programming language. What is the best way for me to create such a program described above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I feel like that an experienced programmer would not need much more than a few hours to create this? Am i wrong, should i try to hire someone or is it possible i could solve this myself within a reasonable amount of time?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The threads below almost describes what i want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/launch-external-ilogic-rule-with-vba/m-p/3170614/highlight/true#M36266" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/launch-external-ilogic-rule-with-vba/m-p/3170614/highlight/true#M36266&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/run-ilogic-external-rule-with-inventor-vba/m-p/6266896/highlight/true#M63103" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/run-ilogic-external-rule-with-inventor-vba/m-p/6266896/highlight/true#M63103&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thankful for any help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 08:26:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6963619#M102293</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-22T08:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Run external iLogic on event</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6963915#M102294</link>
      <description>&lt;P&gt;did you know about the code injector?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://beinginventive.typepad.com/being-inventive/2012/02/injecting-ilogic-code-and-ilogic-event-triggers-automatically.html" target="_blank"&gt;http://beinginventive.typepad.com/being-inventive/2012/02/injecting-ilogic-code-and-ilogic-event-triggers-automatically.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 10:40:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6963915#M102294</guid>
      <dc:creator>HermJan.Otterman</dc:creator>
      <dc:date>2017-03-22T10:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Run external iLogic on event</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6964016#M102295</link>
      <description>&lt;P&gt;Thanx for your reply. I've briefly read through the post about the code injector, but to my understanding, this involves "injecting" code into existing files?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to avoid having to much code and references to code inside my files if possible. But maybe this is a solution after all, as long as the references are to external ilogic which can easily be edited.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 11:20:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6964016#M102295</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-22T11:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Run external iLogic on event</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6964069#M102296</link>
      <description>&lt;P&gt;I thought you could&amp;nbsp;also "inject" triggers&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 11:43:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6964069#M102296</guid>
      <dc:creator>HermJan.Otterman</dc:creator>
      <dc:date>2017-03-22T11:43:55Z</dc:date>
    </item>
    <item>
      <title>Re: Run external iLogic on event</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6964228#M102297</link>
      <description>&lt;P&gt;Take this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/applicationevents-onsavedocument-onopendocument/m-p/6835351#M69670" target="_blank"&gt;File events&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;And this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Public Sub iLogic(rule As String, Optional bLocal As Boolean = False)
Dim iLogicAuto As Object
Dim addIn As Inventor.ApplicationAddIn
Try
addIn = invApp.ApplicationAddIns.ItemById("{3bdd8d79-2179-4b11-8a5a-257b1c0263ac}")
addIn.Activate()
iLogicAuto = addIn.Automation
Catch
iLogicAuto = Nothing
End Try
If thisDoc Is Nothing Then
MsgBox("Cant find any open file")
Exit Sub
End If
If (iLogicAuto Is Nothing) Then Exit Sub
If bLocal = True Then
iLogicAuto.RunRule(thisDoc, rule)
Else
iLogicAuto.RunExternalRule(thisDoc, rule)
End If

End Sub&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Mar 2017 12:40:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6964228#M102297</guid>
      <dc:creator>JoAntt</dc:creator>
      <dc:date>2017-03-22T12:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Run external iLogic on event</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6964285#M102298</link>
      <description>&lt;P&gt;Thanx guys. I'll give this programming thing a go and report back when i hit a dead end.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Btw, would you say that the self paced guide by autodesk is a good way to start or are there any other resources which will suit me better?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/J&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 12:55:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6964285#M102298</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-22T12:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Run external iLogic on event</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6965291#M102299</link>
      <description>&lt;P&gt;Step 1: Install the devtools.msi that comes in the SDK with inventor.&lt;/P&gt;
&lt;P&gt;Step 2: Find "VBAAutoMacro" sample.&lt;/P&gt;
&lt;P&gt;Step 3: Open the sample and read the readme.&lt;/P&gt;
&lt;P&gt;Step 4: Follow the instruction in the readme. Very simple. (to create the .addin file, just make a txt with the exact text in it, then rename the file to .addin).&lt;/P&gt;
&lt;P&gt;Step 5: Open Inventor and reap the rewards.&lt;/P&gt;
&lt;P&gt;Step 6: Write a marco to run on startup that enables event tracking in inventor&lt;/P&gt;
&lt;P&gt;Step 7: Write&amp;nbsp;the macro that catches the even and runs an iLogic rule.&lt;/P&gt;
&lt;P&gt;Step 8:&amp;nbsp;Implement them all properly.&lt;/P&gt;
&lt;P&gt;Step 9: Profit.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2017 17:13:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6965291#M102299</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2017-03-22T17:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Run external iLogic on event</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6973793#M102300</link>
      <description>&lt;P&gt;Okay, with the help from you guys I have managed to copy paste my way to a working add-in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the add-in template 2017 and Microsoft Visual Studio 2015. I started by following this guide:&lt;/P&gt;&lt;P&gt;&lt;A href="http://modthemachine.typepad.com/my_weblog/2008/10/converting-vba-auto-macros-to-an-add-in.html" target="_blank"&gt;http://modthemachine.typepad.com/my_weblog/2008/10/converting-vba-auto-macros-to-an-add-in.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then i simply copy pasted some code from a thread here and tweaked it a bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since I don't know how to write code, I did my best declaring variables and so on. I also deactivated some variable, but don't really know why.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="1_snTXFElFuQLSFDnvZKJ6IA" style="width: 455px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/337663i8DF2214AC0116967/image-size/large?v=v2&amp;amp;px=999" role="button" title="1_snTXFElFuQLSFDnvZKJ6IA" alt="1_snTXFElFuQLSFDnvZKJ6IA" /&gt;&lt;/span&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I actually don't know where to paste the code i found on this forum in my project, but it compiles and runs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could i get some kind of quick peer review and comments&amp;nbsp;on what&amp;nbsp;changes i should make to my addin to avoid any problems&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See attached project&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//J&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2017 12:17:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6973793#M102300</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-26T12:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Run external iLogic on event</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6974056#M102301</link>
      <description>&lt;P&gt;I've come across one snag.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My program now runs my external ilogic code on the event Before Save, when the active document is saved.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If i edit this part from a parent assembly from the BOM, nothing is updated in my parts when i save. But the addin runs for each part (because my msgbox pops up twice. Once from the active parent assembly and once for the part in the assembly)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a add an iLogic event trigger in the ipt which fires on "before save". This is run, even if i edit my part from another document, For example from the BOM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to replicate this behaviour?&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Mar 2017 17:31:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/run-external-ilogic-on-event/m-p/6974056#M102301</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-26T17:31:27Z</dc:date>
    </item>
  </channel>
</rss>

