<?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 Adding iLogic Rule Using the API in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/3181654#M138796</link>
    <description>&lt;P&gt;I've caught glimpses of how to do this (For instance, this plugin (&lt;STRONG&gt;Inventor LinkParameters&lt;/STRONG&gt;﻿)&amp;nbsp;&amp;nbsp;&lt;A target="_blank" href="http://labs.autodesk.com/utilities/ADN_plugins/"&gt;http://labs.autodesk.com/utilities/ADN_plugins/&lt;/A&gt;﻿) , but honestly feel stumped when trying to actually find information on any documentation of how to get from point A to point B. I can't seem to find anything about ilogic automation / rule creation / ilogic in general, in the object browser at all.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I know code like this exists&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Option Explicit

Sub RuniLogicRule()

Dim iLogicAuto As Object
Set iLogicAuto = GetiLogicAddin(ThisApplication)
If (iLogicAuto Is Nothing) Then Exit Sub

Dim doc As Document
Set doc = ThisApplication.ActiveDocument

Dim ruleName As String
ruleName = "Rule0"
Dim rule As Object
Set rule = iLogicAuto.GetRule(doc, "Rule0")
If (rule Is Nothing) Then
  Call MsgBox("No rule named " &amp;amp; ruleName &amp;amp; " was found in the document.")
  Exit Sub
End If

Dim i As Integer
i = iLogicAuto.RunRuleDirect(rule)

End Sub


Function GetiLogicAddin(oApplication As Inventor.Application) As Object
Dim addIns As ApplicationAddIns
Set addIns = oApplication.ApplicationAddIns

Dim addIn As ApplicationAddIn
On Error GoTo NotFound
Set addIn = oApplication.ApplicationAddIns.ItemById("{3bdd8d79-2179-4b11-8a5a-257b1c0263ac}")

If (addIn Is Nothing) Then Exit Function

addIn.Activate
Set GetiLogicAddin = addIn.Automation
Exit Function
NotFound:
End Function&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;(and even fixed the error it gave me due to the original code leaving something out) , but have no idea where any info on the GetRule method is.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If anyone could help to point me in the correct direction for documentation or could provide an example even, I would be most grateful, as I certainly failing to see a major piece of the puzzle.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2011 05:19:31 GMT</pubDate>
    <dc:creator>MegaJerk</dc:creator>
    <dc:date>2011-10-06T05:19:31Z</dc:date>
    <item>
      <title>Adding iLogic Rule Using the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/3181654#M138796</link>
      <description>&lt;P&gt;I've caught glimpses of how to do this (For instance, this plugin (&lt;STRONG&gt;Inventor LinkParameters&lt;/STRONG&gt;﻿)&amp;nbsp;&amp;nbsp;&lt;A target="_blank" href="http://labs.autodesk.com/utilities/ADN_plugins/"&gt;http://labs.autodesk.com/utilities/ADN_plugins/&lt;/A&gt;﻿) , but honestly feel stumped when trying to actually find information on any documentation of how to get from point A to point B. I can't seem to find anything about ilogic automation / rule creation / ilogic in general, in the object browser at all.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I know code like this exists&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;Option Explicit

Sub RuniLogicRule()

Dim iLogicAuto As Object
Set iLogicAuto = GetiLogicAddin(ThisApplication)
If (iLogicAuto Is Nothing) Then Exit Sub

Dim doc As Document
Set doc = ThisApplication.ActiveDocument

Dim ruleName As String
ruleName = "Rule0"
Dim rule As Object
Set rule = iLogicAuto.GetRule(doc, "Rule0")
If (rule Is Nothing) Then
  Call MsgBox("No rule named " &amp;amp; ruleName &amp;amp; " was found in the document.")
  Exit Sub
End If

Dim i As Integer
i = iLogicAuto.RunRuleDirect(rule)

End Sub


Function GetiLogicAddin(oApplication As Inventor.Application) As Object
Dim addIns As ApplicationAddIns
Set addIns = oApplication.ApplicationAddIns

Dim addIn As ApplicationAddIn
On Error GoTo NotFound
Set addIn = oApplication.ApplicationAddIns.ItemById("{3bdd8d79-2179-4b11-8a5a-257b1c0263ac}")

If (addIn Is Nothing) Then Exit Function

addIn.Activate
Set GetiLogicAddin = addIn.Automation
Exit Function
NotFound:
End Function&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;(and even fixed the error it gave me due to the original code leaving something out) , but have no idea where any info on the GetRule method is.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If anyone could help to point me in the correct direction for documentation or could provide an example even, I would be most grateful, as I certainly failing to see a major piece of the puzzle.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2011 05:19:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/3181654#M138796</guid>
      <dc:creator>MegaJerk</dc:creator>
      <dc:date>2011-10-06T05:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Adding iLogic Rule Using the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/3190728#M138797</link>
      <description>&lt;P&gt;There is some documentation available.&amp;nbsp; If you open the LinkParameters solution in Visual Studio, you can find it on the Object Browser under Autodesk.iLogic.Interfaces.&amp;nbsp; Look at the IiLogicAutomation interface.&amp;nbsp; This has an AddRule function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;This documentation is found in an XML file: Autodesk.iLogic.Interfaces.xml.&amp;nbsp; On Inventor 2011, this file is found in&lt;BR /&gt;C:\Program Files\Autodesk\Inventor 2011\Bin\iLogicBin&lt;/P&gt;
&lt;P&gt;On 2012, it is found in&lt;BR /&gt;C:\Program Files\Autodesk\Inventor 2012\Bin&lt;/P&gt;
&lt;P&gt;&amp;nbsp;We should be able to add more documentation and produce a .chm file in a future version.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2011 15:08:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/3190728#M138797</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2011-10-13T15:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Adding iLogic Rule Using the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/3190928#M138798</link>
      <description>&lt;P&gt;Is there a way to add a reference to this file in the VBA editor (that comes with Inventor)? Any time that I try to add it in the object browser it gives me the error of : Can’t add a reference to the specified file.&lt;BR /&gt;&lt;BR /&gt;I have Visual Studios at home, but not here at work, which is why I am curious about adding it to the VBA editor if possible.&lt;BR /&gt;&lt;BR /&gt;Thank you! &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2011 16:40:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/3190928#M138798</guid>
      <dc:creator>MegaJerk</dc:creator>
      <dc:date>2011-10-13T16:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Adding iLogic Rule Using the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/3190946#M138799</link>
      <description>&lt;P&gt;You can't add it in VBA because it only&amp;nbsp;exposes .NET interfaces, and not&amp;nbsp;COM.&lt;BR /&gt;You can download a free version of Visual Studio (Visual Basic Express) at&lt;BR /&gt;&lt;A href="http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-basic-express" target="_blank"&gt;http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-basic-express&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2011 16:50:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/3190946#M138799</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2011-10-13T16:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adding iLogic Rule Using the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/12413398#M138800</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt;&amp;nbsp;thank you for this reference, it was really helpful!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 15:06:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/12413398#M138800</guid>
      <dc:creator>Walliguy</dc:creator>
      <dc:date>2023-12-01T15:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Adding iLogic Rule Using the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/12413595#M138801</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5803839"&gt;@Walliguy&lt;/a&gt;&amp;nbsp;- do you mean&amp;nbsp;Autodesk.iLogic.Interfaces.xml?&lt;BR /&gt;For recent releases of Inventor, all the information in there is now available online. Here's the &lt;A href="https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=110f3019-404c-4fc4-8b5d-7a3143f129da" target="_blank" rel="noopener"&gt;2024 version&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 16:21:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/12413595#M138801</guid>
      <dc:creator>MjDeck</dc:creator>
      <dc:date>2023-12-01T16:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Adding iLogic Rule Using the API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/12413977#M138802</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/537534"&gt;@MjDeck&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Yes I was referring the XML file. Thanks for the link, I have always navigated my way into the help documentation through Inventor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 19:21:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/adding-ilogic-rule-using-the-api/m-p/12413977#M138802</guid>
      <dc:creator>Walliguy</dc:creator>
      <dc:date>2023-12-01T19:21:06Z</dc:date>
    </item>
  </channel>
</rss>

