How can I Retrieve NearestAirportCurrentApproachName?

So I’m building an application in C# that communicates with the simConnectSDK.
So far I’m able to get some variables like airspeed through something like:

                my_simconnect.AddToDataDefinition(DEFINITIONS.Struct1, "AIRSPEED INDICATED", "knots", SIMCONNECT_DATATYPE.FLOAT64, 0.0f, SimConnect.SIMCONNECT_UNUSED);

Now i’m trying to retrieve the nearest airport that according to the
documentation, uses the name NearestAirportCurrentApproachName and I’m trying
to retrieve it like this:

                my_simconnect.AddToDataDefinition(DEFINITIONS.Struct1, "NearestAirportCurrentApproachName", null, SIMCONNECT_DATATYPE.STRING32, 0.0f, SimConnect.SIMCONNECT_UNUSED); 

but I always get code 7 SIMCONNECT_EXCEPTION_NAME_UNRECOGNIZED My question
is… How can I get GPS variables? What am I doing wrong?

These variables are from the old fs9gps stuff and have C: prefix rather than
A: prefix normally. I’m not sure if they’re accessible from WASM or not.

Hello @frednovack Like @tracernz said to access the GPS variables you need to
put the C: prefix followed by fs9gps (C:fs9gps:Variable Name , Units) but you
can’t access those variable in C#, you will need to use JS to do so. You can
also write a JS program that will write the wanted variable in a txt file and
read this file with your C# application but you can’t access them directly
with C#. Best regards, Yohan