December 24, 200718 yr The following code works for departure airport frequencies:---------------%(0 (>@c:FlightPlanWaypointIndex))%((@c:FlightPlanWaypointICAO) (>@c:WaypointAirportICAO))%((@c:WaypointAirportFrequenciesNumber) s2 0 !=)%{if}%(0 sp1)%{loop}%(l1 (>@c:WaypointAirportCurrentFrequency))%((@c:WaypointAirportFrequencyName))%!s!%t%((@c:WaypointAirportFrequencyValue,Mhz) 100 * near d 100 div)%!03d!.%(100 %)%!02d!%(l1 ++ s1 l2 < d)%{if}n%{end}%{next}%{end}----------------and the following for the arrival airport frequencies:----------------%((@c:FlightPlanWaypointsNumber) 1 - (>@c:FlightPlanWaypointIndex))%((@c:FlightPlanWaypointICAO) (>@c:WaypointAirportICAO))%((@c:WaypointAirportFrequenciesNumber) s2 0 !=)%{if}%(0 sp1)%{loop}%(l1 (>@c:WaypointAirportCurrentFrequency))%((@c:WaypointAirportFrequencyName))%!s!%t%((@c:WaypointAirportFrequencyValue,Mhz) 100 * near d 100 div)%!03d!.%(100 %)%!02d!%(l1 ++ s1 l2 < d)%{if}n%{end}%{next}%{end}------------------Problem is, I want to show both lists at the same time, and this doesn't work. Both bits of code in the same gauge shows nothing, but having one chunk at a time works fine.Can anyone help?Preferably, this should only be calculated once at startup, rather than doing everything over with each update? I'm not sure how to go about this. One idea is to build a string from each section of code, and then display each string in a different place, but again I'm a bit lost there.
December 24, 200718 yr Hello You can include 2 sets of different information in one page :- %(10 s2 0 != )%{if}%(0 sp1)%{loop}%(l1 (>@c:NearestVorCurrentLine) l1 (>@c:NearestNdbCurrentLine))%((@c:NearestVorCurrentIdent))%!s!t%((@c:NearestVorCurrentFrequency, MHz) 100 * near d 100 div)%!03d!.{fnt1}%(100 %)%!02d!t%((@c:NearestNdbCurrentIdent))%!s!t%((@c:NearestNdbCurrentFrequency, KHz) 10 * near d 10 div)%!03d!.%(10 %)%!01d!%(l1 ++ s1 l2 < d)%{if}n%{end}%{next}%{end} But I never got what you need to work. Paul EGLD
December 24, 200718 yr Thanks for trying ;)I think the problem is that I'm setting waypointairport to two different things at the same time. I need to figure out how to do one, save the results somewhere, and then the other.
December 24, 200718 yr >------------------>Problem is, I want to show both lists at the same time, and>this doesn't work. Both bits of code in the same gauge shows>nothing, but having one chunk at a time works fine.>>Can anyone help?Unfortunately you won't be able to show what you want, in the way you want to. Assigning an index to a WaypointXXXX var is asyncronic, so the data returned is only visible in the next cycle. But it wouldn't be difficult to make two identical gauges, and put one version of the code on each one. The user would see no difference at all.>Preferably, this should only be calculated once at startup,>rather than doing everything over with each update? The code you did it's ok, it needs to be set on each cycle/update.Tom
December 24, 200718 yr Tom, thanks so much.I'm quite proud of myself, I thought of the 2nd gauge idea while painting the garden furniture just now, and come inside to confirmation from yourself :)This XML stuff is slowly sinking in, I can't wait to get to a point where I can help others, and give something back! This forum is a huge help.
Create an account or sign in to comment