- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, everybody.
I'm facing the following problem:
My Part has some custom iProperties. Two of them are "=<Sheet Metal Length>" and "=<Sheet Metal Width>"
Also I have a rule that contains this SyntaxEditor Code Snippet:
iProperties.Value("Custom", "Comp.(mm)") = "=<Sheet Metal Length>" iProperties.Value("Custom", "Larg.(mm)") = "=<Sheet Metal Width>" If iProperties.Value("Custom", "Comp.(mm)") >= iProperties.Value("Custom", "Larg.(mm)") Then iProperties.Value("Custom", "Comp.(mm)") = "=<Sheet Metal Length>" iProperties.Value("Custom", "Larg.(mm)") = "=<Sheet Metal Width>" Else iProperties.Value("Custom", "Comp.(mm)") = "=<Sheet Metal Width>" iProperties.Value("Custom", "Larg.(mm)") = "=<Sheet Metal Length>" End If
Finally I have a PartsList with those values "Comp.(mm)" and "Larg.(mm)" in which I "always" want the bigger value in the column "Comp.(mm)" and the smaller value in the column "Larg.(mm)".
Well, when I run the rule it proceeds fine in the custom iProperties, but it doesn't proceeds in the PartsList columns, I mean, the values don't match.
The PartsList is keeping only the first part of the rule:
iProperties.Value("Custom", "Comp.(mm)") = "=<Sheet Metal Length>" iProperties.Value("Custom", "Larg.(mm)") = "=<Sheet Metal Width>"
And ignores the second part of the rule:
If iProperties.Value("Custom", "Comp.(mm)") >= iProperties.Value("Custom", "Larg.(mm)") Then iProperties.Value("Custom", "Comp.(mm)") = "=<Sheet Metal Length>" iProperties.Value("Custom", "Larg.(mm)") = "=<Sheet Metal Width>" Else iProperties.Value("Custom", "Comp.(mm)") = "=<Sheet Metal Width>" iProperties.Value("Custom", "Larg.(mm)") = "=<Sheet Metal Length>" End If
¿¿¿Would I have some snipet to make the rule run completely in the PartsList too???
Solved! Go to Solution.
