Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Xml, external macro calls,strings, and formatted text

Featured Replies

HiAbout the macros call, or call to another gauge/dll. How does this really work? Is it possible to call an xml macro located in another gauge? That would have been extremely helpful, with a separate gauge containing loads of subfunctions the other gauges require. I tried some last night, but was unsuccessful.Has anyone found out how to store a custom string to an (L:Variable,string), then print it out again? I've tried both direct and preformatted, but I just can't get it to work.As for formatted text, which I'm really starting to fall in love with, I seem to fail formatting with leading zeroes in a float. Is it broken, or am I broken? :) Also, are there any numerical/decimal tabs available?

  • Commercial Member

I've found no special formatting for numberical data (believe me, I've tried). You can do things like special case tabs using the format /{tabs=xxR,xxC,xxL} /{tabs=} which overide the default formatted text tabs. Aditionally you can define secondary colors and fonts. For example if you wanted to have some number turn red if it's below 0, you could do so by first defining the secondary color and then using the special case {clrX} tags.{clr2}%This text will by Cyan{clr}{clr1}%This text will be red{clr}nFor tabs, you can do this:{tabs=50R,60,145,244R}tColumns1tColumns2tColumns3{tabs=}That may help you special case numerical formatting within the same text block.Hope that helps,--Jon

  • Commercial Member

Oh, I forgot to address strings and macros:Macros cannot be made global, but since they are not technically variables and probably consume insignificant amounts of memory, just copy them from gauge to gauge using some master XML document to make all changes to. As you probably know, you can pass them multiple arguments which makes them extremely useful as functions, and they also make very fine constants.Strings are a complete mystery to me, and Microsoft isn't making it any easier. The lastest SDK has shed no light on the subject, or for that matter, any other XML specific information. In fact they're so difficult to get working, I've just resorted to using enums and macro defined constants with the {case} construct.By the way, have you got any idea why this doesn't work:Pseudo:...Or this:...It's driving me NUTS! It only accepts a number - period. No variable and certainly not an expresson.--Jon

Hi Karl,.....leading zeroes in a float.....Put the digit Zero in front of the format specification.So:With 06.2f the value 8.123 is printed as: 008.12orWith 06d the value 123 is printed as 000123Now, with negative numbers you're in trouble :-)With 06.2f: -8.123 becomes 0-8.12-0.10 becomes 00-.10-23.12 becames -23.12Same for 06d:- 123 becomes 00-123I.o.w: the last leading 0 is subtituded by the - sign, not the first.A very clumsy bug.Rob

Only tried with floats, but 06.2f seems to work for me only in "regular" text elements, not formattedtext. Maybe there was another bug there somewhere (_very_ complex string display with nested cases and ifs - yuck).In any case, I worked around it by using tabs instead. Heh, never noticed that negative number bug, but I guess could be worked by concatenating a string, doing a negative check and print out the sign before an absolute version of the number was printed.The only number I have been able to pass half a function to, is using the ? word to select between two colors in a text element - that's it :( I'm quite annoyed that I can't do it with anything else, because it would have eased doesn on programming *a lot*! I use(d) rather heavy macros on many gauges - fixing every one of them for each modification proved such a hazzle I put them all into a single gauge now (calculations and initialization stuff). I really hoped to avoid it though, the gauge looks like a mess :)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.