The manual has some examples in C++ how to read these variables. They work through the Panel interface ( in P3D4+ the same functions are in the PDK ), but in both cases, access to these functions call works only through an in-process executable, like a .DLL module or an airplane Gauge.
If you are doing an external .EXE, you cannot access those functions directly, so you need either:
- Do a separate .DLL module only to access L: variables from the sim, and have this communicate with the external app using some of the Windows functions, like Sockets, Named Pipes or IPC
- Use FSUIPC and interface with it, to get the L: variables and send them back to your application.