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

iLogic rule will not run on another PC

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.

MegaJerk
in reply to: Anonymous

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 :slightly_smiling_face:
iLogicCode Injector: goo.gl/uTT1IB

GitHub
LukeDavenport
in reply to: Anonymous

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
Anonymous
in reply to: MegaJerk

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

Anonymous
in reply to: Anonymous

You da man Megajerk!

djen
in reply to: Anonymous

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.