<?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: Running iLogic rules from .net app is extremely slow in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/12772942#M48647</link>
    <description>&lt;P&gt;I have a current VBA macro like this :&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub bt_Extraire_Click()
   ExportPartsBOM
End Sub&lt;/LI-CODE&gt;&lt;P&gt;The workflow is :&lt;/P&gt;&lt;P&gt;-from the iLogic browser : right click "Run all rules"&lt;/P&gt;&lt;P&gt;-run the macro&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I've modified the macro :&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub bt_Extraire_Click()
 ThisApplication.CommandManager.ControlDefinitions.Item("iLogic.RegenAllRules").Execute
   ExportPartsBOM
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And now... The execution of the rules take several minutes, instead of some seconds !&lt;/P&gt;</description>
    <pubDate>Tue, 14 May 2024 17:04:23 GMT</pubDate>
    <dc:creator>TONELLAL</dc:creator>
    <dc:date>2024-05-14T17:04:23Z</dc:date>
    <item>
      <title>Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10414676#M48636</link>
      <description>&lt;P&gt;Open inventor, run a rule that makes a handful of parameter changes, etc. It takes ~20 seconds to run&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Open a .net app that uses the Inventor .net API to call&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;iLogicAutomation.RunRuleWithArguments&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with Inventor running in the background or as a separate app&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it takes minutes to run.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can we have similar performance to running these rules as if we ran them manually within inventor?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 14:24:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10414676#M48636</guid>
      <dc:creator>greg.mort</dc:creator>
      <dc:date>2021-06-23T14:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10415058#M48637</link>
      <description>&lt;P&gt;The .Net app in question is it an .exe app that Marshalls to the inventor app ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If yes, then I'd say it is to be expected. marshalling takes time. My guess is that the Ilogic Rule runs on the calling thread. Your app being on an external thread, it means that every calls to Inventor objects are to be marshalled...&lt;BR /&gt;&lt;BR /&gt;If what you hope, by using a .Net app, is to improve performance, then I recommend that you create an Addin and then translate all your&amp;nbsp; ILogic rules into your addin, you would be able to create command button just like with VBA macros and the performance will be better.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my experience, a complex operation took about 16 sec with VBA, 30 sec with a .NET app and 10 sec with a .Net addin&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 16:21:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10415058#M48637</guid>
      <dc:creator>yan.gauthier</dc:creator>
      <dc:date>2021-06-23T16:21:43Z</dc:date>
    </item>
    <item>
      <title>Re: Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10415703#M48638</link>
      <description>interesting... Could I then go the c++ route? and build my .exe app using the c++ API instead of the .net API? I haven't dug deep enough to understand if that uses Pinvoke and perhaps has better performance. It does appear possible to run c++ with ilogic rules &lt;A href="https://adndevblog.typepad.com/manufacturing/2013/09/run-ilogic-rule-from-external-application.html" target="_blank"&gt;https://adndevblog.typepad.com/manufacturing/2013/09/run-ilogic-rule-from-external-application.html&lt;/A&gt;</description>
      <pubDate>Wed, 23 Jun 2021 20:05:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10415703#M48638</guid>
      <dc:creator>greg.mort</dc:creator>
      <dc:date>2021-06-23T20:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10420194#M48639</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Honestly, I am pretty sure switching to C++ won't change anything. My approach would be to create an addin with C# and simply rebuild the rules from within the addin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the code samples from the SDK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a side note, Unity's dev team confirmed that C# can run as fast as C++ if you use the right libraries and all. On the other end, Linq is so much of a godsend, performance loss is rarely an issue is those case.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 13:00:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10420194#M48639</guid>
      <dc:creator>yan.gauthier</dc:creator>
      <dc:date>2021-06-25T13:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10420558#M48640</link>
      <description>&lt;P&gt;Tried it yesterday in c++ with negligible changes. Running COM that then has to interface with the addin (which is still a .net dll) means it only adds to the complexity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The ilogic rules are already created (hundreds of them), so switching them to be an add in I don't think makes a lot of sense for our end goal. We are trying to eventually replace them all, but wanted to have our API approach be able to match what they are currently doing (by simply just calling them) and slowly replace them, but its just too slow...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure there is a winning solution to this, unless someone has a novel idea of what to do?&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>Fri, 25 Jun 2021 14:52:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10420558#M48640</guid>
      <dc:creator>greg.mort</dc:creator>
      <dc:date>2021-06-25T14:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10420615#M48641</link>
      <description>&lt;P&gt;I'm pretty sure that using that calling the ilogic automation API from within an addin would work without issue. All you need is declare the addinServer and the button definitions. that way, the process that calls the Ilogic would be Inventor itself, so no com interop performance loss&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise, you could set your Ilogic to trigger with a parameter and then use your .Net app to change the parameter only ?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 15:10:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10420615#M48641</guid>
      <dc:creator>yan.gauthier</dc:creator>
      <dc:date>2021-06-25T15:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10421272#M48642</link>
      <description>&lt;P&gt;If you know the command name you can use the commandmanager for it!&lt;/P&gt;
&lt;P&gt;This should be easy.&lt;/P&gt;
&lt;P&gt;Like:&lt;/P&gt;
&lt;P&gt;Thisapplication.commandmanager.contoldefinition.item(commandname).execute&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 19:36:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10421272#M48642</guid>
      <dc:creator>bradeneuropeArthur</dc:creator>
      <dc:date>2021-06-25T19:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10496679#M48643</link>
      <description>&lt;P&gt;There are quite a few commands available within the ControlDefinition, but not 'runrule'&lt;BR /&gt;&lt;BR /&gt;iLogic.About : About iLogic : About iLogic&lt;BR /&gt;iLogic.AddForm : Add Form : Add Form&lt;BR /&gt;iLogic.AddRule : Add Rule : Add Rule&lt;BR /&gt;iLogic.AssignName : Assign Name... : Assign Name...&lt;BR /&gt;iLogic.ClearCodeClipboard : Clear captured code : Clear captured code&lt;BR /&gt;iLogic.Configuration : iLogic Configuration : iLogic Configuration&lt;BR /&gt;iLogic.DeleteAllRules : Delete All Rules : Delete All Rules&lt;BR /&gt;iLogic.DeleteName : Delete Name : Delete Name&lt;BR /&gt;iLogic.DrawingGenerateCode : Capture Current State : Capture Current State&lt;BR /&gt;iLogic.EditName : Edit Name... : Edit Name...&lt;BR /&gt;iLogic.EditRule : Edit Rule : Edit Rule&lt;BR /&gt;iLogic.EventTriggers : Event Triggers : Event Triggers&lt;BR /&gt;iLogic.FreeILogicMemory : Free iLogic Memory : Free iLogic Memory&lt;BR /&gt;iLogic.HideLabel : Hide Label : Hide Label&lt;BR /&gt;iLogic.HideLabels : Hide Labels : Hide Labels&lt;BR /&gt;iLogic.iCopy : iLogic Design Copy : iLogic Design Copy&lt;BR /&gt;ilogic.logwindow : :&lt;BR /&gt;iLogic.PlaceComponent : Place iLogic Component : Place iLogic Component&lt;BR /&gt;iLogic.RegenAllRules : Regenerate All Rules : Regenerate All Rules&lt;BR /&gt;iLogic.RuleBrowser : iLogic Browser : iLogic Browser&lt;BR /&gt;iLogic.ShowLabel : Show Label : Show Label&lt;BR /&gt;iLogic.ShowLabels : Show Labels : Show Labels&lt;BR /&gt;ilogic.treeeditor : :&lt;BR /&gt;iLogic.Trigger : iTrigger : iTrigger&lt;BR /&gt;iLogic.XmlExport : Export to XML : Export to XML&lt;BR /&gt;iLogic.XmlImport : Import from XML : Import from XML&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jul 2021 14:24:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/10496679#M48643</guid>
      <dc:creator>greg.mort</dc:creator>
      <dc:date>2021-07-26T14:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/11410907#M48644</link>
      <description>&lt;P&gt;any update on this? I'm facing the exact same issue &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 11:08:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/11410907#M48644</guid>
      <dc:creator>johnster100</dc:creator>
      <dc:date>2022-09-09T11:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/12772745#M48645</link>
      <description>Same thing for me, 2 years later...&lt;BR /&gt;Always no improvements ?</description>
      <pubDate>Tue, 14 May 2024 15:41:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/12772745#M48645</guid>
      <dc:creator>TONELLAL</dc:creator>
      <dc:date>2024-05-14T15:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/12772878#M48646</link>
      <description>&lt;P&gt;Don't think so.&lt;/P&gt;&lt;P&gt;App run outside IV processing and memory space.&amp;nbsp; It'll always be slower.&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-4939ABD1-A15E-473E-9376-D8208EC029EB" target="_blank"&gt;https://help.autodesk.com/view/INVNTOR/2023/ENU/?guid=GUID-4939ABD1-A15E-473E-9376-D8208EC029EB&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ilogic, addin and macro run inside IV.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Converting iLogic to VB.Net shouldn't be difficult.&amp;nbsp; Most of it is VB code.&lt;/P&gt;&lt;P&gt;I've converted all my macro to addin.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 16:30:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/12772878#M48646</guid>
      <dc:creator>Frederick_Law</dc:creator>
      <dc:date>2024-05-14T16:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/12772942#M48647</link>
      <description>&lt;P&gt;I have a current VBA macro like this :&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub bt_Extraire_Click()
   ExportPartsBOM
End Sub&lt;/LI-CODE&gt;&lt;P&gt;The workflow is :&lt;/P&gt;&lt;P&gt;-from the iLogic browser : right click "Run all rules"&lt;/P&gt;&lt;P&gt;-run the macro&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I've modified the macro :&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Sub bt_Extraire_Click()
 ThisApplication.CommandManager.ControlDefinitions.Item("iLogic.RegenAllRules").Execute
   ExportPartsBOM
End Sub&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And now... The execution of the rules take several minutes, instead of some seconds !&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 17:04:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/12772942#M48647</guid>
      <dc:creator>TONELLAL</dc:creator>
      <dc:date>2024-05-14T17:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Running iLogic rules from .net app is extremely slow</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/12772972#M48648</link>
      <description>&lt;P&gt;Yes, it is slow.&amp;nbsp; We all know it.&amp;nbsp; It can't be faster.&amp;nbsp; Use something else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's why I converted all my macros to Addin.&amp;nbsp; Since at least IV2012.&lt;/P&gt;&lt;P&gt;I've been using iLogic for 2 years and again I found the need to go to Addin.&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 17:25:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/running-ilogic-rules-from-net-app-is-extremely-slow/m-p/12772972#M48648</guid>
      <dc:creator>Frederick_Law</dc:creator>
      <dc:date>2024-05-14T17:25:26Z</dc:date>
    </item>
  </channel>
</rss>

