Jump to content
Sign in to follow this  
phjvh

XML - IF THEN help needed

Recommended Posts

Guest ZIACargo

A little help please...I am checking Zero Fuel Weight (ZFW)Expression for ZFW - ((A:TOTAL WEIGHT, POUNDS) (A:FUEL TOTAL QUANTITY WEIGHT, POUNDS) -)Best way to describe what I wantIf ZFW is greater than (>) 44000 then display "OVER WEIGHT" in redelse display "In Limits" in greenI will also check Taxi Weight TOTAL WEIGHT < 51250Here is a mock up of what I'm working towards.http://forums.avsim.net/user_files/88061.jpgThere will be much more to the gauge, and I will have more questions.Thanks for the help

Share this post


Link to post
Share on other sites

This may help but may be 180* out of phase.. YOUR CALL %((A:TOTAL WEIGHT, POUNDS) (A:FUEL TOTAL QUANTITY WEIGHT, POUNDS) - 44000 > )%{if}%OVER WEIGHT%{else}%IN LIMITS%{end}hope it will help,Regards,Roman(KGRB)http://home.new.rr.com/spokes2112/images/Image2.gif


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest ZIACargo

This is what I used.I get a green OVER WEIGHT - changing cargo weight to change ZFW does not change the display%((A:TOTAL WEIGHT, POUNDS) (A:FUEL TOTAL QUANTITY WEIGHT, POUNDS) - 44000 >;)%{if}%OVER WEIGHT%{else}%In Limits%{end}Ideas?

Share this post


Link to post
Share on other sites

Hi,Didn't test but:1. Try to change red and green in the color tag.2. You may have to change the order of "Overweight" and "In Limits" in the Hope it helps,Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest ZIACargo

I have it working 50%The correct text will show. The correct color does not...I dropped the ; after the > sign and it started working.Line of code for the text:%((A:TOTAL WEIGHT, POUNDS) (A:FUEL TOTAL QUANTITY WEIGHT, POUNDS) - 44000 >)%{if}%OVER WEIGHT%{else}%In Limits%{end}I have tried both of these lines to change the color:Both default to green...I tried to drop the ; but it did not work.

Share this post


Link to post
Share on other sites

Hi,This code works for my color tag:Color="%('green' 'orange' (A:GPS DRIVES NAV1,bool) ?)" so you could try again:Mind some "Spaces between" !?Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...