Visible Condition Checking

Comments

4 comments

  • Avatar
    Justin Eldridge

    I believe so. Raw expression is only available on the M2 hardware platform (PV780B, PV1100, PV1200 etc).

    I find it extremely useful when I want to check for more than one variable without making a calculation event.

    In your particular case you can just do this:

    0
    Comment actions Permalink
  • Avatar
    John Kelsey

    Thanks for the reply. That expression was a simple one that I could just use the normal visible condition for. I was thinking I might be able to write a more complicated expression to check more than one variable.

    So

    if(and(x>1,x<3,y>1,y<3),visible,not visible))

    and if that expression will be ok what do I use instead of visible and not visible so it know whether to display the image or not?

    Thanks for your help and I'm sorry I was so long in replying. My boss took me off this project.

     

    0
    Comment actions Permalink
  • Avatar
    Justin Eldridge

    John, sorry for the late reply and for being so long winded, this assumes you are not using the M2 platform I explained above. 

    That expression you created would result in a 0 or a 1. Use that variable/value as your visible condition. In this case you would want to include the max value of 1

    Also - your above expression would result in 0 if true and 1 if false. I recommend reversing that since your variable will default to 0 unless you specifically change it. Swap the ,0,1 to ,1,0

    Since this expression needs to be called to be evaluated you will either need to add it to a cycling state machine, or some other way to call it (button press, etc). Or, what might be easiest is to use the variables you are evaluating anyways. "Fire on change" will fire a calculation event anytime the latitude changes. Point it to your expressions' calculation event. Point the longitude to the same calculation event.

    0
    Comment actions Permalink
  • Avatar
    John Kelsey

    Thanks for the reply Justin.

     

    That all does make sense, I'll give that a go.

    0
    Comment actions Permalink

Please sign in to leave a comment.