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.

LVAR not working in Gauge XML

Featured Replies

Hi, I have a strange problem I cant resolve. The variable for the MSFS PMDG heading window (L:ngx_HDGwindow,Number) works just fine in the Observe Variables window but when I include it in a guage XML script as per below it makes the desktop FIP window loads as just a black window and the application hangs. Can you advise where I am going wrong?

<Element>
    <Position X="570" Y="66"/>
    <GaugeText>
       <FontFace>Bahnschrift Semi-Bold</FontFace>
       <FontHeight>40</FontHeight>
       <FontColor>0xfbf8f4</FontColor>
       <HorizontalAlign>Right</HorizontalAlign>
       <Value>%(L:ngx_HDGwindow,String)%</Value>
    </GaugeText>
</Element>

 

Thanks in advance

I have also tried <Value>%(L:ngx_HDGwindow,Number)%</Value> which also works in the observe window but not in the gauge xml

This is not restricted to just this variable I cant seam to get any L: type variables to work in the gauge XML

Edited by broganj
addition

  • Commercial Member

Your Syntax is wrong. Please look at the specs again.

  • Firstly, AAO expects a Space character between the comma and the Unit, especially when you use ", String" - which only exists in AAO, not in the real sim world. Be mindful of that, you cannot just drop ", String" in when you feel like it - for example, AAO will not be able to read (L:ngx_HDGwindow, String) from the sim
  • Second, your % % defs are missing the formatting part !..!

<Value>%(L:ngx_HDGwindow, Number)%!03d!</Value>
displays an integer number.filled up with leading zeroes if it has less than three digits. 

<Value>%(L:ngx_HDGwindow, Number)%!3.2f!</Value>
Displays it as a floating point number with two digit fractions

Edited by Lorby_SI

LORBY-SI

  • Author

Thank you so much for the quick reply, this kind of support is amazing 🙂

When you refer to the 'specs' are you referring to Microsoft SDK specifications or is there another reference that I should use. A link would be really good if you have one

 

BTW, you fixed my problem, thanks again

Edited by broganj
update

  • Commercial Member
2 minutes ago, broganj said:

Thank you so much for the quick reply, this kind of support is amazing 🙂

When you refer to the 'specs' are you referring to Microsoft SDK specifications or is there another reference that I should use. A link would be really good if you have one

 

BTW, you fixed my problem, thanks again

No, I mean the AAO manual and the extra PDF about the Gauges. All RPN operators are described in the manual, there is a big table in the chapter about Scripting. But the simulator SDK spec can help too, it is just not exactly the same (AAO has more operators and additional commands for RPN, but less/different elements for gauge XML).

But the best strategy is to look at existing gauges to see how they were made. There is a lot of examples to be downloaded from the AxisAndOhs website.

Edited by Lorby_SI

LORBY-SI

Archived

This topic is now archived and is closed to further replies.

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.