Rule Compile Errors: Could not find a part of the path

Rule Compile Errors: Could not find a part of the path

Anonymous
Not applicable
1,969 Views
11 Replies
Message 1 of 12

Rule Compile Errors: Could not find a part of the path

Anonymous
Not applicable

About twice to thrice times a week I receive this error.

 

Error 1.JPGError 2.JPG

 

 

 

 

 

 

 

 

 

 

I restart Inventor and it goes away for a day or two, then upon saving BAM, it's back.

 

How does one resolve this?

 

Thanks!

0 Likes
1,970 Views
11 Replies
Replies (11)
Message 2 of 12

Mark.Lancaster
Consultant
Consultant

@Anonymous

 

Welcome to the Autodesk User's Community..

 

Are you actually setting a path in your coding to your personal temp (%temp%) folder?  If so you shouldn't be doing that.

Mark Lancaster


  &  Autodesk Services MarketPlace Provider


Autodesk Inventor Certified Professional & not an Autodesk Employee


Likes is much appreciated if the information I have shared is helpful to you and/or others


Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

0 Likes
Message 3 of 12

Anonymous
Not applicable

No, the path is to my network folder so multiple users can use these rules. Only two of the users have that issue, me being one of them.

Error 3.JPG

 

 

0 Likes
Message 4 of 12

dgreatice
Collaborator
Collaborator

Hi,

 

make sure all user, when create map network drive in windows folder are same.

 

example, all drive set to J:\

Please use the ACCEPT AS SOLUTION or KUDOS button if my Idea helped you to solve the problem.

Autodesk Inventor Professional Certified 2014
0 Likes
Message 5 of 12

Anonymous
Not applicable

All file paths are setup correct/ the same amongst all the users. The issue only came about after we upgraded to inventor 2019 from the 2018 version.

0 Likes
Message 6 of 12

GeorgK
Advisor
Advisor

This happens when the network is down or not reachable:

 

If My.Computer.Network.IsAvailable Then
    MsgBox("Computer is connected.")
Else
    MsgBox("Computer is not connected.")
End If
0 Likes
Message 7 of 12

GeorgK
Advisor
Advisor

Or with your drive:

 

Sub Main
Dim sDrive As String = "J:"
 
If IsDriveReady(sDrive) Then
  MsgBox("Laufwerk " & sDrive & " ist bereit.")
Else
  MsgBox("Laufwerk " & sDrive & " existiert nicht oder ist nicht verfügbar!")
End If
End Sub


Public Function IsDriveReady(ByVal sDrive As String) As Boolean
  ' Prüft, ob das angegebene Laufwerk existiert und
  ' ob darauf zugegriffen werden kann
  Try
    Dim oDrive As New System.IO.DriveInfo(sDrive)
    Return oDrive.IsReady
  Catch ex As Exception
    Return False
  End Try
End Function
0 Likes
Message 8 of 12

nlowe3FXX2
Participant
Participant

Hi,

I just ran into this problem the last few days. Here is what I did, and I am surprised it even worked. 

The error is basically saying it can't find a file in a specific folder. I believe that Inventor is suppose to be making this folder automatically, but something has glitched. 

The way I solved it was by following the file path in file explorer that it was supposedly looking for. Yours would be

C:\Users\Ryans\AppData\Local\Temp\iLogic Rules\Approval.vb

When I got as far as the "Temp" folder I saw that the "iLogic Rules" folder wasn't there...so as a desperate joke I just made one. I created a new folder and named it " iLogic Rules ". When I went back into inventor my code worked perfectly again.....and all of the rule populated in the folder I had just created. 

 

Hope this helps!

 

Message 9 of 12

MjDeck
Autodesk
Autodesk

@Anonymous and @nlowe3FXX2 , if you still see this error occasionally, please use the workaround described in Message 5 on this thread.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 10 of 12

Mohamed_Rafick
Explorer
Explorer
It works for me... Thanks
Message 11 of 12

lszlsos
Observer
Observer

I don't know why, but when en external rule runs, a .vb file is created in that Temp folder (C:\Users\XY\AppData\Local\Temp\iLogic Rules) with the same name as the external rule. If that folder doesn't exist, the error massage pops up.

 

This was the case, when my external rule (C:\Users\Public\Documents\Autodesk\Inventor 2020\Macros\Mass.iLogicVb) tried to run too. The Inventor (Professional 2020) tried to create the Mass.vb file on that Temp folder but failed, because it didn't exist. After I manually created that Folder, my external rule ran correctly. But everytime when that rule is runnig, the Mass.vb file is being overwritten again and again. 

 

If somebody knows why is the extra .vb file needed to run the .iLogiVb externel rule please tell us! 🙂

0 Likes
Message 12 of 12

MjDeck
Autodesk
Autodesk

@lszlsos,  the .vb file in the Temp folder should not be overwritten every time you run the rule. But if you modify the rule and run it, or shut down and restart Inventor, then the file will be overwritten.
The temp file is not need to run the rule. It's only needed to debug it, as described here. In order to make it easy to debug, Inventor creates the temp files by default. But if you never debug with Visual Studio and you don't want to see the temp files, you can get rid of them by using the method described in Message 5 on this thread.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes