Hi Zain,
yeah, I was able to sort this thing. For that particular cell (you need elevation data from) you need to create a reference point in the geometry editor. Then during the Rules writing, you should choose that specific reference point (available at the bottom of Simulation variables tab). For more information you can check the following paper of mine: https://www.mdpi.com/2079-3197/11/2/27
Below is my script that I used to give you an idea. Hope this helps
‘rp26-1′ = Reference Points: WS Elevation(rp26-1, Value at current time step)
‘rp26-2′ = Reference Points: WS Elevation(rp26-2, Value at current time step)
If (‘rp26-1′ > Elevation 1) And (‘rp26-2′ < Elevation 2) Then
Gate.Opening(Gate 26) = 0.89
Else
Gate.Opening(Gate 26) = 0
End If
Mfg,
Nurlan