iLogic rule will not run on another PC

iLogic rule will not run on another PC

Anonymous
Not applicable
1,025 Views
5 Replies
Message 1 of 6

iLogic rule will not run on another PC

Anonymous
Not applicable

We use an iLogic rule to set sheet numbers back to the master BOM. This has worked amazingly on my PC meanwhile on my co-workers PC the rule doesn't even run it doesn't show any kind of loading or anything. The other rules all work but then this one doesn't on his end. I'm at a complete loss.

 

Here is the rule.

 

'start of ilogic codeDim oDoc As DrawingDocument:
oDoc = ThisDoc.Document

Dim oSheets As Sheets
Dim oSheet As Sheet
Dim oViews As DrawingViews
Dim oView As DrawingView
Dim SheetNumber As String
i =1

oSheets = oDoc.Sheets


For Each oSheet In oSheets
oViews = oSheet.DrawingViews
For Each oView In oViews
'capture the current view label
ViewLabel = oView.Name
oModelName = _
oView.ReferencedDocumentDescriptor.ReferencedDocument.DisplayName
Try
SheetNumber =Mid(oSheet.Name, InStr(1, oSheet.Name, ":") + 1)
i=1+1
iProperties.Value(oModelName, "Custom", "SHEET") = SheetNumber

Catch
'do nothing if error
End Try
'End If
Next
Next
'end of ilogic code

 

It goes through on my PC and sets the sheets even on the drawing that he is working in but will not run on his. I was thinking it could be a windows verison problem but then why do the all of the other rules but this one work on his pc.

 

I am on Windows 7 he is on Windows 10.

Accepted solutions (1)
1,026 Views
5 Replies
Replies (5)
Message 2 of 6

MegaJerk
Collaborator
Collaborator
Accepted solution

My guess is that the Windows 10 PC (the one on which the rule currently isn't working) has extension settings that differ from the Windows 7 (your) machine. 

Should be in Control Panel -> Folder Options -> View -> Advanced Settings. Make sure that the "Hide extensions for known file types" is set to the same thing as the working machine. 




If my solution worked or helped you out, please don't forget to hit the kudos button 🙂
iLogicCode Injector: goo.gl/uTT1IB

GitHub
Message 3 of 6

LukeDavenport
Collaborator
Collaborator
Try removing the 'Try', 'Catch' and 'End Try' lines of code. Then you'll
see the error message on his machine that is probably being suppressed. It
might be something to do with the 'Mid' statement only working on older
.Net frameworks or something like that.

Post the error message back here so someone can help you.
Luke
0 Likes
Message 4 of 6

Anonymous
Not applicable

That was surprisingly easy to fix didn't even think to check there.

0 Likes
Message 5 of 6

Anonymous
Not applicable

You da man Megajerk!

0 Likes
Message 6 of 6

djen
Enthusiast
Enthusiast
Thank you, this solution slaved my issue.  



My guess is that the Windows 10 PC (the one on which the rule currently isn't working) has extension settings that differ from the Windows 7 (your) machine. 

Should be in Control Panel -> Folder Options -> View -> Advanced Settings. Make sure that the "Hide extensions for known file types" is set to the same thing as the working machine. 

 

0 Likes