<?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 The process cannot access the file... VB File in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/the-process-cannot-access-the-file-vb-file/m-p/9193428#M103865</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are upgrading from Inventor 2017 to Inventor 2020.&lt;/P&gt;&lt;P&gt;I have migrated the files and I'm now testing our existing iLogic code is still working correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm coming across the following exception:&lt;/P&gt;&lt;P&gt;"The process cannot access the file 'C:\Users\cadflow\AppData\Local\Temp\iLogic Rules\DebugHelper.vb' because it is being used by another process."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DebugHelper.vb is a straight vb file - we've been using this vb file since Inventor 2013.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We utilize iLogic heavily - we have models that are written entirely in iLogic and some that the iLogic calls out to a dll that we've built in Visual Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Caveat here is that we run multiple instances of Inventor that concurrently process iLogic rules - similar to how the Task Scheduler can run multiple instances.&lt;/P&gt;&lt;P&gt;Similar issue to this post:&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/ilogic-error-when-using-task-scheduler/td-p/8418656" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/ilogic-error-when-using-task-scheduler/td-p/8418656&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be nice to understand what has changed between 2017&amp;gt;2020 in how iLogic compiles/executes code to result in this exception. I can see the path has changed to %temp$\iLogic Rules\ for starters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
    <pubDate>Tue, 10 Dec 2019 14:26:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-12-10T14:26:50Z</dc:date>
    <item>
      <title>The process cannot access the file... VB File</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/the-process-cannot-access-the-file-vb-file/m-p/9193428#M103865</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are upgrading from Inventor 2017 to Inventor 2020.&lt;/P&gt;&lt;P&gt;I have migrated the files and I'm now testing our existing iLogic code is still working correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm coming across the following exception:&lt;/P&gt;&lt;P&gt;"The process cannot access the file 'C:\Users\cadflow\AppData\Local\Temp\iLogic Rules\DebugHelper.vb' because it is being used by another process."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DebugHelper.vb is a straight vb file - we've been using this vb file since Inventor 2013.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We utilize iLogic heavily - we have models that are written entirely in iLogic and some that the iLogic calls out to a dll that we've built in Visual Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Caveat here is that we run multiple instances of Inventor that concurrently process iLogic rules - similar to how the Task Scheduler can run multiple instances.&lt;/P&gt;&lt;P&gt;Similar issue to this post:&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/ilogic-error-when-using-task-scheduler/td-p/8418656" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/ilogic-error-when-using-task-scheduler/td-p/8418656&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be nice to understand what has changed between 2017&amp;gt;2020 in how iLogic compiles/executes code to result in this exception. I can see the path has changed to %temp$\iLogic Rules\ for starters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 14:26:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/the-process-cannot-access-the-file-vb-file/m-p/9193428#M103865</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-10T14:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: The process cannot access the file... VB File</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/the-process-cannot-access-the-file-vb-file/m-p/9194511#M103874</link>
      <description>&lt;P&gt;From what I've observed it looks as though iLogic in Inventor 2017 creates temp rule files in %TEMP% with a random file name - therefore avoiding clashes with concurrent instances.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;iLogic in Inventor 2020 is storing the files with a structured file name and therefore is a potential for access clashes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this is correct hopefully there is a workaround or different approach to use?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 21:30:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/the-process-cannot-access-the-file-vb-file/m-p/9194511#M103874</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-10T21:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: The process cannot access the file... VB File</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/the-process-cannot-access-the-file-vb-file/m-p/9194607#M103878</link>
      <description>&lt;P&gt;Digging deeper...&lt;/P&gt;&lt;P&gt;The files created in /%temp%/iLogic Rules/ are used under the hood for debugging through Visual Studio&lt;/P&gt;&lt;P&gt;(&lt;A href="https://modthemachine.typepad.com/my_weblog/ilogic/" target="_blank"&gt;https://modthemachine.typepad.com/my_weblog/ilogic/&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't find a setting within Inventor to turn this functionality off but I did find that creating a System Environment Variable called "iLogicRuleFolderForVS" set to the value 0 seems to turn this feature off&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This appears to resolve my issue BUT i'm worried that the&amp;nbsp;iLogicRuleFolderForVS flag could be removed in a future update&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2019 22:20:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/the-process-cannot-access-the-file-vb-file/m-p/9194607#M103878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-10T22:20:22Z</dc:date>
    </item>
  </channel>
</rss>

