<?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: Variable update bug in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/variable-update-bug/m-p/6577768#M66965</link>
    <description>The ABC EFG and RTU variables are the straight Inventor parameters</description>
    <pubDate>Thu, 22 Sep 2016 12:31:01 GMT</pubDate>
    <dc:creator>S7RM7RPR</dc:creator>
    <dc:date>2016-09-22T12:31:01Z</dc:date>
    <item>
      <title>Variable update bug</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/variable-update-bug/m-p/6575619#M66934</link>
      <description>&lt;P&gt;First, I apologise if I'm not clear so if you need clarification just ask and I'll probably reply pretty quick. (assuming it isn't 3 years later)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a program set up where I am importing some 400 unique values from a database file via a .dll (probably irrelevant) based on specific design criteria. What I need, is to "null" (0, blank, or false respectively) all the parameters in Inventor (Mechanical 2015) whenever I import a new design so that I don't accidentally carry over incorrect data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Ideally when I import, if the value is 'nothing' it should set the parameter to null but it appears that it just skips the parameter when it is 'nothing'. When I set the parameters as "parameter("example")" it sees 'nothing' as Boolean and won't update the parameter. I've considered creating a temporary array to convert 'nothing' values, but then I don't know if the value is supposed to be an integer, Boolean or text.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. When I run the "reset" code and the "import" code separately (as two different buttons), it works cleanly every time. When I run them sequentially, either combined into one rule or as two separate rules, it will reset all values but then it won't update the new imported values - and the values seem to update differently for different designs. For one design it would import every value except for 3 specific values, and then for a different design it would only update 1 value. Then, when you run the logic twice in a row, it will flip-flop between the updated values and null values. I've even added a delay between running import and reset, but it will only work if you run the rules totally separately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At this point my conclusion is that it just seems to be a bug in the way Inventor updates it's values and I have to leave it as two separate functions&lt;/P&gt;</description>
      <pubDate>Wed, 21 Sep 2016 13:47:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/variable-update-bug/m-p/6575619#M66934</guid>
      <dc:creator>S7RM7RPR</dc:creator>
      <dc:date>2016-09-21T13:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Variable update bug</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/variable-update-bug/m-p/6575632#M66935</link>
      <description>&lt;P&gt;Some example code. I've left out a couple things for reasons so assume that the import function works as is (aside from the whole 'nothing' issue)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SyntaxEditor Code Snippet&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Sub&lt;/SPAN&gt; &lt;SPAN&gt;Main&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;
    
    &lt;SPAN&gt;IMPORTED&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;False&lt;/SPAN&gt;
    &lt;SPAN&gt;ResetValues&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;
    &lt;SPAN&gt;InventorVb&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;DocumentUpdate&lt;/SPAN&gt;&lt;SPAN&gt;()&lt;/SPAN&gt;
    &lt;SPAN&gt;System&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Threading&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;Thread&lt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SPAN&gt;1&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
    &lt;SPAN&gt;EFG2&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;output&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
    &lt;SPAN&gt;RTU3&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;output&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;
    
&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 21 Sep 2016 13:52:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/variable-update-bug/m-p/6575632#M66935</guid>
      <dc:creator>S7RM7RPR</dc:creator>
      <dc:date>2016-09-21T13:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Variable update bug</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/variable-update-bug/m-p/6577757#M66964</link>
      <description>&lt;P&gt;In your stripped down ImportValues code, did you define ABC1, EFG2, RTU3 as Parameter("ABC1"), Parameter("EFG2") and Parameter("RTU3")?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2016 12:24:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/variable-update-bug/m-p/6577757#M66964</guid>
      <dc:creator>bshbsh</dc:creator>
      <dc:date>2016-09-22T12:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Variable update bug</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/variable-update-bug/m-p/6577768#M66965</link>
      <description>The ABC EFG and RTU variables are the straight Inventor parameters</description>
      <pubDate>Thu, 22 Sep 2016 12:31:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/variable-update-bug/m-p/6577768#M66965</guid>
      <dc:creator>S7RM7RPR</dc:creator>
      <dc:date>2016-09-22T12:31:01Z</dc:date>
    </item>
  </channel>
</rss>

