Message 1 of 2
Set iLogic form box to '0' if other form box selected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hopefully someone can help me as i'm going around in circles.
I have two dummy parameters TWIST_LEFT & TWIST_RIGHT in an iLogic form that are limited to values of between 0 & 90 degrees each. What I want is if one parameter is selected and changed (within 0 & 90) then the 2nd parameter is set to 0.
I have included my code which seems to end up in a loop of setting both dummy parameters to 0 and not allowing any change then, I can see why but can't think of a solution.
Many thanks
' ******* TWIST_CHUTE_LEFT Limits ******* If TWIST_LEFT < 0 Then TWIST_LEFT = 0 MessageBox.Show("The minimum value for 'CHUTE TWIST ANGLE ANTI-CLOCKWISE' is: 0 " & vbCr & "The value will be automatically corrected to the minimum.", "Minimum Value Rule", MessageBoxButtons.OK, MessageBoxIcon.Error) parameter("DCHUTE_TWIST_LEFT") = TWIST_LEFT DCHUTE_TWIST_ANGLE1 = parameter("DCHUTE_TWIST_ANGLE1") ElseIf TWIST_LEFT > 90 Then TWIST_LEFT = 90 MessageBox.Show("The maximum value for 'CHUTE TWIST ANGLE ANTI-CLOCKWISE' is: 90 " & vbCr & "The value will be automatically corrected to the maximum.", "Maximum Value Rule", MessageBoxButtons.OK, MessageBoxIcon.Error) parameter("DCHUTE_TWIST_LEFT") = TWIST_LEFT DCHUTE_TWIST_ANGLE1 = parameter("DCHUTE_TWIST_ANGLE1") Else parameter("DCHUTE_TWIST_LEFT") = TWIST_LEFT DCHUTE_TWIST_ANGLE1 = parameter("DCHUTE_TWIST_ANGLE1") If TWIST_RIGHT = 0 Then ELSE TWIST_RIGHT = 0 End If End If If TWIST_RIGHT < 0 Then TWIST_RIGHT = 0 MessageBox.Show("The minimum value for 'CHUTE TWIST ANGLE CLOCKWISE' is: 0 " & vbCr & "The value will be automatically corrected to the minimum.", "Minimum Value Rule", MessageBoxButtons.OK, MessageBoxIcon.Error) parameter("DCHUTE_TWIST_RIGHT") = TWIST_RIGHT DCHUTE_TWIST_ANGLE1 = parameter("DCHUTE_TWIST_ANGLE1") ElseIf TWIST_RIGHT > 90 Then TWIST_RIGHT = 90 MessageBox.Show("The maximum value for 'CHUTE TWIST ANGLE CLOCKWISE' is: 90 " & vbCr & "The value will be automatically corrected to the maximum.", "Maximum Value Rule", MessageBoxButtons.OK, MessageBoxIcon.Error) parameter("DCHUTE_TWIST_RIGHT") = TWIST_RIGHT DCHUTE_TWIST_ANGLE1 = parameter("DCHUTE_TWIST_ANGLE1") Else parameter("DCHUTE_TWIST_RIGHT") = TWIST_RIGHT DCHUTE_TWIST_ANGLE1 = parameter("DCHUTE_TWIST_ANGLE1") If TWIST_LEFT = 0 Then Else TWIST_LEFT = 0 End If End If