Ok here we go, now i was able to reproduce your "bug".. fortunately its the same story 🙂
I had the same issue some months befor.
its the because of the line:
LinerMachining = True
here you also have to do it this way:
Parameter("LinerMachining") = True
so that the parameter will be set immediatly.
I just changed the lines where you write the parameters.. so this is the hole rule I got now:
iLogicVb.UpdateWhenDone=True
OutPipeClearanceDia=OutPipeDia-2*(OutPipeTck+Clearance) 'Only informative reference given in parameter list
Parameter("LDM_Min") = LinerDia-2*(LinerTck*0.5) 'Chosen minimum Dia for Liner when machined
Parameter("LDM_Max") = LinerDia-2*(LinerTck*0.1) 'Chosen minimum Dia for Liner when machined
If LinerDia <= OutPipeDia-2*(OutPipeTck+Clearance) Then
Parameter("LinerMachining") = False
Feature.IsActive("Extrusion4_LinerMachining")=False
End If
If LinerDia > OutPipeDia-2*(OutPipeTck+Clearance) AndAlso LinerDia <= LinerMaxOverSize Then
'LinerMaxOverSize = Chosen Max LinerDia for Purchased oversize Pipe (conditions where Liner have to be machined)
Answer=MessageBox.Show("Liner requires machining!", "Attention", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation)
End If
If Answer=vbYes Then
myparam=InputBox("Please enter a value between LDM_Min and LDM_Max","LinerDiaMachined",">="& LDM_Min & "and <=" & LDM_Max)
If myparam = "" Then Exit Sub '<=== Added this line
MessageBox.Show("Value=" & myparam, "The value I entered")
LinerDiaMachined=myparam
Parameter("LinerMachining") = True
Feature.IsActive("Extrusion4_LinerMachining") = True
iLogicVb.UpdateWhenDone=True
ElseIf Answer=vbNo Then
MessageBox.Show("OutPipeDia will then be" & vbCr & vbCr & "auto preset 1 step up", "Information")
Parameter("LinerMachining") = False
Feature.IsActive("Extrusion4_LinerMachining")=False
End If
If LinerMachining = "False" Then
OutPipeDiaMin=LinerDia+2*(OutPipeTck+Clearance) 'Preselected Min Dia of OutPipe
foundVal=MultiValue.FindValue(MultiValue.List("OutPipeDia"),">",OutPipeDiaMin)
Parameter("OutPipeDia")=foundVal
End If
If LinerDia > LinerMaxOverSize Then
OutPipeDiaMin=LinerDia+2*(OutPipeTck+Clearance) 'Preselected Min Dia of OutPipe
foundVal=MultiValue.FindValue(MultiValue.List("OutPipeDia"), ">", OutPipeDiaMin)
Parameter("OutPipeDia")=foundVal
Parameter("LinerMachining") = False
Feature.IsActive("Extrusion4_LinerMachining")=False
End If
I hope it works for you!
greetings
Aleksandar Krstic
Produkt- und Projektmanager

