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.

ATC_ID in C Gauge

Featured Replies

  • Moderator

What is the syntax and format for reading the XML variable for ATC_ID and then writing the value to string in C?

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Probably something likePCHAR c_atc_string;execute_calculator_code ( (A:ATC ID, string), c_atc_string, 0 );Doug

Try:...PCHAR patc=NULL;...execute_calculator_code("(A:ATC ID,string)",NULL,NULL,(const char **)&patc);....if(patc)//... patc....Arne Bartels

  • Author
  • Moderator

Thanks, guys. I'll give it a go when I can find some time to "experiment."For now I'll simply use the old "tried and true" XML code I've used forever... ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

If you're going to experiment, start with Arne's example... I was just going from memory ;-) Doug

  • Author
  • Moderator

>If you're going to experiment, start with Arne's example... >I was just going from memory ;-) >>DougNo problem, Doug. Right now I've got a much bigger fish to fry, but I'll return to it eventually. I just figured that by now someone would have already "done it" so why reinvent the wheel? ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • 3 months later...

>Try:>...>PCHAR patc=NULL;>...>execute_calculator_code("(A:ATC ID,string)",NULL,NULL,(const>char **)&patc);>....>if(patc)>//... patc....>Arne BartelsHi Arne, Thanks for the code. I've not had much experience with strings in my project, mostly comprising of steam-gauges. I've been trying most of the afternoon to simply read the

>If AnsiContainsStr(patc, 'G-BOAC')>>Is there a similar method for use in C? I

Thanks Hans!

  • 2 months later...

Gents,Hello! I've been messing around with the scenery end of FS for a few years now, but now I'm trying to create an FS Module. I'd like to read the ATC_ID with the module and I was hoping to use the execute_calculator_code I can't seem to find where the function is defined though. Is there a way I can include this in my module? Thanks for the help!Matt Perryfoxtrotsierra.org

The function is defined in the GAUGES.H header file distributed with the FS9 Panels SDK.Doug

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.