Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all
I have 3 custom iProperties, Job No. & Line No. & Sheet No.
If Sheet No. has 2 digits then Part Number iProperty will equal "Job No.-Line No.-Sheet No.
but if Sheet No. has 1 or 3 and more digits then Part Number iProperty will equal only the Sheet No.
Now. I have the below code that work only if the rule is in the part. if I add this to the external rules all I get is the small thinking windows circle and then I have to close Inventor.
The rule will be set to trigger with iProperty change.
Can someone please let me know what I'm missing
Donald
Inventor 2014 (Soon to be 2019)
SyntaxEditor Code Snippet
EJN = iProperties.Value("Custom", "Job No.") ELN = iProperties.Value("Custom", "Line No.") ESN = iProperties.Value("Custom", "Sheet No.") SNL = Len(ESN) If SNL = 1 Then iProperties.Value("Project", "Part Number") = iProperties.Value("Custom", "Sheet No.") Else If SNL = 2 Then iProperties.Value("Project", "Part Number") = EJN & "-" & ELN & "-" & ESN Else If SNL > 2 Then iProperties.Value("Project", "Part Number") = iProperties.Value("Custom", "Sheet No.") End If iLogicVb.UpdateWhenDone = True
Solved! Go to Solution.