Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
504 Views, 2 Replies

The process cannot access the file... VB File

Hi,

 

We are upgrading from Inventor 2017 to Inventor 2020.

I have migrated the files and I'm now testing our existing iLogic code is still working correctly.

 

I'm coming across the following exception:

"The process cannot access the file 'C:\Users\cadflow\AppData\Local\Temp\iLogic Rules\DebugHelper.vb' because it is being used by another process."

 

DebugHelper.vb is a straight vb file - we've been using this vb file since Inventor 2013.

 

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.

 

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.

Similar issue to this post: https://forums.autodesk.com/t5/inventor-customization/ilogic-error-when-using-task-scheduler/td-p/84...

 

Any help is appreciated.

 

It would be nice to understand what has changed between 2017>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.

 

Thanks,

Tom

Anonymous
in reply to: Anonymous

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.

 

iLogic in Inventor 2020 is storing the files with a structured file name and therefore is a potential for access clashes

 

If this is correct hopefully there is a workaround or different approach to use?

Anonymous
in reply to: Anonymous

Digging deeper...

The files created in /%temp%/iLogic Rules/ are used under the hood for debugging through Visual Studio

(https://modthemachine.typepad.com/my_weblog/ilogic/)

 

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

 

This appears to resolve my issue BUT i'm worried that the iLogicRuleFolderForVS flag could be removed in a future update