- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have some simple iLogic conditional code (partially shown below) that reads the user parameter “Thk” and then constructs a string for the parts list BOM. If the value is equal to one of our commonly used sheet metal thicknesses, the numeric value for the BOM with replaced with “10 GA.” or “11 GA.” etc.
Here’s what’s driving me crazy… This iLogic rule works perfectly for all the thicknesses except for when parameter “Thk” = 0.1046. In this condition, iLogic does not interpret it a being equal to the code, even though it is. When I change the code and parameter value to 0.1045 and re-run the rule, it works. Same thing for 0.1047, it works too.
Am I missing something here? Here’s my iLogic code:
'Mild/Carbon Steel
If Parameter("Thk") = 0.1345 Then
val_Thk = "10 GA."
ElseIf Parameter("Thk") = 0.1196 Then
val_Thk = "11 GA."
ElseIf Parameter("Thk") = 0.1046 Then
val_Thk = "12 GA."
ElseIf Parameter("Thk") = 0.0897 Then
val_Thk = "13 GA."
ElseIf Parameter("Thk") = 0.0747 Then
val_Thk = "14 GA."
'Stainless Steel
ElseIf Parameter("Thk") = 0.1406 Then
val_Thk = "10 GA."
ElseIf Parameter("Thk") = 0.1251 Then
val_Thk = "11 GA."
ElseIf Parameter("Thk") = 0.1094 Then
val_Thk = "12 GA."
ElseIf Parameter("Thk") = 0.0937 Then
val_Thk = "13 GA."
ElseIf Parameter("Thk") = 0.0781 Then
val_Thk = "14 GA."
Else
val_Thk = Parameter("Thk")
val_Thk = RoundToFraction(val_Thk, 1/16, RoundingMethod.Round) &""""
EndIf
extents_width = SheetMetal.FlatExtentsWidth
extents_width = RoundToFraction(extents_width, 1/16, RoundingMethod.Round)
iProperties.Value("Project", "Description") = "PL "&val_Thk&" x "&extents_width&""""
iProperties.Value("Custom", "BOM_Length") = SheetMetal.FlatExtentsLength
Solved! Go to Solution.