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.

Simple Select Case XML Code Help Please

Featured Replies

I've done several searches in this forum to find an example of what I am trying to do, but I've not found a working solution. Here is my code:

			<Element>				<Select>				<Value>(A:NUMBER OF ENGINES, NUMBER)</Value>				<Case Value="1">1 (>G:Var1)</Case>				<Case Value="2">2 (>G:Var1)</Case>				<Case Value="3">3 (>G:Var1)</Case>				<Case Value="4">4 (>G:Var1)</Case>				</Select>				<Position X="180" Y="180"/>				<FormattedText X="150" Y="16" Bright="Yes" Length="150" Font="Arial" FontSize="14" LineSpacing="16" Color="#CD8DC5">				<String>Number of Engines: %((G:Var1))%!d!%</String>				</FormattedText>			</Element>

All I'm trying to do at this point is to get my code to show the number of engines detected on the airplane. Right now, the gauge shows 0 where I am attempting to display the # of engines. Thank you.

Try <Element> <Position X="100" Y="180"/> <Text X="150" Y="14" Bright="Yes" Length="150" Font="Arial" Color="#CD8DC5"> <String>%Number of Engines: %((A:NUMBER OF ENGINES, number))%!d!</String> </Text> </Element>

Paul EGLD

  • Author
Try <Element> <Position X="100" Y="180"/> <Text X="150" Y="14" Bright="Yes" Length="150" Font="Arial" Color="#CD8DC5"> <String>%Number of Engines: %((A:NUMBER OF ENGINES, number))%!d!</String> </Text> </Element>
Yes, I know this will work, thank you. This is more an exercise in learning how to write a select case. I want to add more code for each case once I understand the basic syntax of the select case.
  • Author

After spending some more time in the SDK, I determined how to do what I was trying to do with a case:

<String>%Number of Engines: %(4 3 2 1 0 5 (A:NUMBER OF ENGINES, NUMBER) case) %!d!</String>

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.