<?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: Trigger an External Rule after a parameter change in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5087530#M124246</link>
    <description>&lt;P&gt;Hello Mike,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, it shure does work!! &amp;nbsp;I already tried it. But this tool is only good for transfering internal rules masively to a set of files,but it does not transfer the triggers for those rules. &amp;nbsp;You will have to configure triggers manually for each file. &amp;nbsp;So by the end of the day, neither the internal and external rules fire after any parameter change. &amp;nbsp;The issue persists!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My only hope is to be able to configure the trigger as per&amp;nbsp;&lt;SPAN&gt;Autodesk User Group International's website: &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"Notes on External Rules:&amp;nbsp;External Rules do not run automatically in response to parameter changes. If you need this functionality, you will have to code it yourself. Check out&amp;nbsp;‘&lt;U&gt;&lt;STRONG&gt;ModelingEventsSink.OnParameterChange Method&lt;/STRONG&gt;&lt;/U&gt;’ in the developer help."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jun 2014 11:48:19 GMT</pubDate>
    <dc:creator>juandv30</dc:creator>
    <dc:date>2014-06-11T11:48:19Z</dc:date>
    <item>
      <title>Trigger an External Rule after a parameter change</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5077710#M124241</link>
      <description>&lt;P&gt;Hello everyone...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I´ve been trying to trigger an &lt;U&gt;external rule&lt;/U&gt; when I change any parameter in an ipt file. &amp;nbsp;I founded in Autodesk User Group International's website the following: &amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;Notes on External Rules:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;External Rules do not run automatically in response to parameter changes. If you need this functionality, you will have to code it yourself. Check out&amp;nbsp;‘ModelingEventsSink.OnParameterChange Method’ in the developer help."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To see the full article: &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://www.augi.com/library/playing-by-the-ilogic-rules" target="_blank"&gt;http://www.augi.com/library/playing-by-the-ilogic-rules&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After that, I went to the developer help but I couldn´t understand how to write the code to run the external rule after changing any of the existing parameters in my model. &amp;nbsp;I already tested my code as an internal rule and use the trigger "Any model parameter change" and it works fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anybody help sending me a sample code so I can adapt it to my rule? &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Juan Velez&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2014 19:33:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5077710#M124241</guid>
      <dc:creator>juandv30</dc:creator>
      <dc:date>2014-06-05T19:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an External Rule after a parameter change</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5077780#M124242</link>
      <description>&lt;P&gt;An easy way to have an external rule run when an parameter changes is to have two rules. Your external rule, and an internal helper rule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your external rule any place you use the parameter it must referenced as &lt;STRONG&gt;&lt;U&gt;Parameter("parameterName")&lt;/U&gt;.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your internal rule reference the parameter as just parameterName.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your helper rule references the parameters so it will run when the parameters are changed and it runs the external rule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;External Rule:&lt;/P&gt;&lt;PRE&gt;Parameter("doubleLength") = Parameter("length") * 2.0 ul&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Internal Helper Rule:&lt;/P&gt;&lt;PRE&gt;value = length

iLogicVb.RunExternalRule("ExternalRuleName")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example if the value of length changes it will run the external rule. In the external rule any parameters can be used.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2014 19:56:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5077780#M124242</guid>
      <dc:creator>rjay75</dc:creator>
      <dc:date>2014-06-05T19:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an External Rule after a parameter change</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5078154#M124243</link>
      <description>&lt;P&gt;Hi rjay75.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just tested your suggested solution and works fine&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I am planing to use the external rule to write and edit a bunch of parameters in thousands of existing files. &amp;nbsp;The solution you suggested works fine for a new file where the internal rule can be created. &amp;nbsp;I does not seem to be practical for running the external rule in files created previously.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea is to open each old file, and have the capability to edit some user parameters using global forms and external rules. &amp;nbsp;I have several parameters that depend from some other multivalue parameters. &amp;nbsp;What I would like to happen is the dependant parameter update automatically once a multivalue option is selected without using an update button.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank a lot&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2014 21:50:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5078154#M124243</guid>
      <dc:creator>juandv30</dc:creator>
      <dc:date>2014-06-05T21:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an External Rule after a parameter change</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5081924#M124244</link>
      <description>&lt;P&gt;You may consider the following workaround.&lt;BR /&gt; You may remember the initial values of your multi-value parameters when your external rule starts.&amp;nbsp; &lt;BR /&gt;In the end you may compare the current values with the initial values, and then implement appropriate actions.&lt;/P&gt;
&lt;P&gt;Not too elegant&amp;nbsp;but this should work.&lt;/P&gt;</description>
      <pubDate>Sun, 08 Jun 2014 16:46:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5081924#M124244</guid>
      <dc:creator>Vladimir.Ananyev</dc:creator>
      <dc:date>2014-06-08T16:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an External Rule after a parameter change</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5086326#M124245</link>
      <description>&lt;P&gt;The iLogic code injection tool by MegaJerk could be useful to you. Search for it here.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2014 19:02:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5086326#M124245</guid>
      <dc:creator>mrattray</dc:creator>
      <dc:date>2014-06-10T19:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an External Rule after a parameter change</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5087530#M124246</link>
      <description>&lt;P&gt;Hello Mike,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, it shure does work!! &amp;nbsp;I already tried it. But this tool is only good for transfering internal rules masively to a set of files,but it does not transfer the triggers for those rules. &amp;nbsp;You will have to configure triggers manually for each file. &amp;nbsp;So by the end of the day, neither the internal and external rules fire after any parameter change. &amp;nbsp;The issue persists!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My only hope is to be able to configure the trigger as per&amp;nbsp;&lt;SPAN&gt;Autodesk User Group International's website: &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;"Notes on External Rules:&amp;nbsp;External Rules do not run automatically in response to parameter changes. If you need this functionality, you will have to code it yourself. Check out&amp;nbsp;‘&lt;U&gt;&lt;STRONG&gt;ModelingEventsSink.OnParameterChange Method&lt;/STRONG&gt;&lt;/U&gt;’ in the developer help."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2014 11:48:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5087530#M124246</guid>
      <dc:creator>juandv30</dc:creator>
      <dc:date>2014-06-11T11:48:19Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an External Rule after a parameter change</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5087564#M124247</link>
      <description>&lt;P&gt;Did you have the latest version? I'm pretty sure he added the ability to add the "injected" rules to the event triggers somewhat recently.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;Here's the link: &lt;A href="http://beinginventive.typepad.com/being-inventive/2012/02/injecting-ilogic-code-and-ilogic-event-triggers-automatically.html" target="_self"&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;It does support adding triggers.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2014 12:07:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5087564#M124247</guid>
      <dc:creator>mrattray</dc:creator>
      <dc:date>2014-06-11T12:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: Trigger an External Rule after a parameter change</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5087810#M124248</link>
      <description>&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, you are right!!! &amp;nbsp;Somehow I didn't see the check boxes for event triggers in the up right corner of the dialog.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will use this method from now on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Juan Velez&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2014 13:36:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/trigger-an-external-rule-after-a-parameter-change/m-p/5087810#M124248</guid>
      <dc:creator>juandv30</dc:creator>
      <dc:date>2014-06-11T13:36:04Z</dc:date>
    </item>
  </channel>
</rss>

