<?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: VBA iLogic Question in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-ilogic-question/m-p/9201653#M68643</link>
    <description>&lt;P&gt;Have you tried making it a SharedVariable at the end of the External Rule?&amp;nbsp; SharedVariables are not saved in the file, they are held in memory for other rules to use.&amp;nbsp; Just remember to SharedVariable.Remove after your done with them.&lt;/P&gt;&lt;P&gt;Or you could create and set the value of an otherwise useless Attribute in an open document within the External Rule, then retrieve its value in the VBA code.&lt;/P&gt;&lt;P&gt;Or you could write the name and value of the variable to an external text file at the end of the Extnal rule, then retrieve that info from that text file and recreate the same variable within the VBA code, after the External rule is called.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2019 19:05:11 GMT</pubDate>
    <dc:creator>WCrihfield</dc:creator>
    <dc:date>2019-12-13T19:05:11Z</dc:date>
    <item>
      <title>VBA iLogic Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-ilogic-question/m-p/9201292#M68642</link>
      <description>&lt;P&gt;Relatively simple question (hopefully) Long story shorter, I'm using a VBA macro to execute an external iLogic rule in order to create a button on the Inventor Ribbon. During the button creation, it prompts the user for several inputs and stores them as values in iLogic. The iLogic rule then compiles them into a single variable.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What I need to is somehow pass that single variable (string type) back to VBA, where the iRule was called from, in order to modify it further. Is there code/syntax for this?&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 15:54:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-ilogic-question/m-p/9201292#M68642</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-13T15:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: VBA iLogic Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-ilogic-question/m-p/9201653#M68643</link>
      <description>&lt;P&gt;Have you tried making it a SharedVariable at the end of the External Rule?&amp;nbsp; SharedVariables are not saved in the file, they are held in memory for other rules to use.&amp;nbsp; Just remember to SharedVariable.Remove after your done with them.&lt;/P&gt;&lt;P&gt;Or you could create and set the value of an otherwise useless Attribute in an open document within the External Rule, then retrieve its value in the VBA code.&lt;/P&gt;&lt;P&gt;Or you could write the name and value of the variable to an external text file at the end of the Extnal rule, then retrieve that info from that text file and recreate the same variable within the VBA code, after the External rule is called.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 19:05:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-ilogic-question/m-p/9201653#M68643</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2019-12-13T19:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: VBA iLogic Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-ilogic-question/m-p/9207084#M68644</link>
      <description>&lt;P&gt;How would I go about the shared variable route? I know how to declare one and close it out in iLogic, but how do I properly call it in VBA?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 14:19:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-ilogic-question/m-p/9207084#M68644</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-17T14:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: VBA iLogic Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-ilogic-question/m-p/9207664#M68645</link>
      <description>&lt;P&gt;I haven't done much with Macros myself, still just doing External rules, but I did find an old Forum Post that might help: &lt;A title="Passing Arguments Forum Post" href="https://forums.autodesk.com/t5/inventor-customization/ilogic-pass-an-argument-back-to-calling-rule/td-p/8371237" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/inventor-customization/ilogic-pass-an-argument-back-to-calling-rule/td-p/8371237&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After the "solution" Post there is a bit of code that uses SharedVariable to pass Arguments.&amp;nbsp; Hope this helps.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 17:39:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-ilogic-question/m-p/9207664#M68645</guid>
      <dc:creator>J-Camper</dc:creator>
      <dc:date>2019-12-17T17:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: VBA iLogic Question</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-ilogic-question/m-p/9207751#M68646</link>
      <description>&lt;P&gt;Sorry for not getting back with you right away...I've been really busy at work.&amp;nbsp; The link that &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4898893"&gt;@J-Camper&lt;/a&gt; posted is a good read for this subject.&amp;nbsp; It lists yet another way to accomplish what you want.&amp;nbsp; In the later posts, they simply create a TransientObject called a NameValueMap and added the value they wanted to pass to the other rule to that object.&amp;nbsp; Like the SharedVariable, it is just held in session memory, so you don't really even need to worry about deleting it or resetting its value to Nothing, as long as you're not planning on calling it again before you restart Inventor.&amp;nbsp; Any one of these methods would likely work for you.&amp;nbsp; Let us know if any of these ideas work for you.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 18:24:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-ilogic-question/m-p/9207751#M68646</guid>
      <dc:creator>WCrihfield</dc:creator>
      <dc:date>2019-12-17T18:24:37Z</dc:date>
    </item>
  </channel>
</rss>

