Sign in to follow this  
taguilo

Usage of text in XML L:Variables

Recommended Posts

Hi,Is it possible to store a text in a (L:something) variable likeMy Text (>L:something,string) for use in other gauges (displaying that "My Text" there)?I can't get it working, tried several units, worked with macros... I'm aware of an old thread here in the forum where it is said it's not possible at all - is that really true?If so, I'll probably have to transform every single charakter to an integer (and back) using the XML string operators symb, ord and chr. But to say the truth, I'm a bit lazy to write that routine - if there is a simplier solution.Any help more than welcome!Herbert

Share this post


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

Nope. L:vars store only float64 numbers, period.

Share this post


Link to post
Share on other sites

While you can't use an L var, you might be able to use an XML Macro to do what you want to do.For example, this statement defines a macro: 0while this one uses it: @DISABLEDThe macro "call" is replaced by the macro's definition. The above uses numbers, but they are treated like text actually, so text would work too, as long as it makes sense where you have it expand.Patrick

Share this post


Link to post
Share on other sites

As Patrick stated, it is easy to handle a short set of predefined text strings using macro references. Even it would be easier to use a simple "case" operator for retrieving one string of up to 25 different. For short and runtime created strings, the Ascii conversion is a good resource as well.Tom

Share this post


Link to post
Share on other sites

Thanks for the answers! That works quite well inside ONE gauge. But how can I get it displayed in an other gauge? As much as I know, these macros are for use in that gauge only where they are defined.Or am I missing something...I want to build a gauge which reads out the NAV AID IDs and stores them in this L:variables / macros so that I can use this information in a different gauge. So I can display the ID belonging to a special frequency without having tuned that frequency.It's still a bit experimental and I'm not shure what the gauge will be for in the end... but if I can not get this working, obviously it will be for nothing...

Share this post


Link to post
Share on other sites

>>I want to build a gauge which reads out the NAV AID IDs and>stores them in this L:variables / macros so that I can use>this information in a different gauge. So I can display the ID>belonging to a special frequency without having tuned that>frequency.>In this case I should go for the ASCII code of individual ID chars.You can save it using a couple of LVars for each ID (1 to 5 chars), and each LVar being a member of an array of IDS. Tom

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