February 10, 200818 yr 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
February 10, 200818 yr Moderator Nope. L:vars store only float64 numbers, period. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
February 11, 200818 yr 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
February 11, 200818 yr Author 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
February 11, 200818 yr 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...
February 11, 200818 yr Author >>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
Create an account or sign in to comment