Sign in to follow this  
rcbarend

String variables in XML gauges ??

Recommended Posts

Does anyone know if it's possible (and if so, how) to use string-variables in XML gauges ??Eg: Printing %((A:NAV1 IDENT,string) )%!s! works fine.However, (A:NAV1 IDENT,string) (>L:Test,string) and then printing%((L:Test,string) )%!s!does nothing.Any ideas ??Rob Barendregt

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

No ideas, it doesn't work. L:vars can't hold strings. There was however a workaround here in the forum some tim ago I think: NAV idents are up to 4 letters long and 4-letter strings can be coded as integers, so with a bit back and forward shifting it might be possible to code a 4-letter string in an integer, use this a L variable and decode the string back from the integer.Arne Bartels

Share this post


Link to post
Share on other sites

It seems that the L vars need a quantity to display ( feet, meters, feet per second etc etc) as opposed to (L:VAR, string) . Look at the example below. Note the use of d 0 == ? in both the following examples. %((L:radaltadjust,feet) 5 max d 0 == ?)%!2d!%Also, following this thought process, you can use LVars to decide things like should string be visible or not.(L:Direction,degrees) d 0 == ? near s0 250 >= l0 290 <= && if{ (L:Groundspeed,feet per second) d 0 == ? near 4 >= } || %LEFT%!7d!%Hope that helps some.Steve

Share this post


Link to post
Share on other sites

Hi guys,Thanks for the answers.In the meantime I found another generic way of solving my problem (which was to print a specific string based on a some condition).Just using case and macro. :-) 'String1' 'String2' 'String3' 3 (G:Var1) caseBy setting G:Var1 to a specific value (in this case 0,1,or 2, based on some condition),%( @PrintString )%!s! will do what I want ...Cheers, Rob

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