Right now, the only way to read or write LVars is from a WASM module, because there are wrappers in WASM for all functions of the old Panels interface, which includes the ability to read/write LVars.
However, there's no easy way to export them to the outside world. for example an external Simconnect client, since WASM modules cannot call any of the WIndows API features ( Named Pipes, Socket, IPC, etc ) that are usually used to send data across processes.
It MIGHT ( although I haven't tried ) be possible to use Simconnect itself to communicate between a WASM module ( which, as of today, can only be a Gauge, since standalone modules are not supported yet ), using the SimConnect_CreateClientData, SimConnect_RequestClientData, SimConnect_SetClientData ( etc. ) functions, so the WASM gauge could communicate with an external .EXE using Simconnnect itself as a transport, and sharing data using some kind of protocol to handle LVars.
It's quite tricky, but might work, provided all the following will work:
- those Simconnect calls working as they did in FSX/P3D, both in the external .EXE and in the WASM module, which not something to take for granted, since even more basic functions are still INOP today.
- until WASM works only with Gauges, it will be fairly impractical, since you would have to add this "proxy" gauge to every airplane you have, something that wouldn't be required if the module could just start with the sim, like any other .DLL
- You'll have to create some data exchange protocol to act on LVars, design the data areas, work with strings ( LVar names ) which can be tricky
It would be way easier if Asobo just added support for LVar to Simconnect natively, so you could just use it from an external .EXE, without having to deal with any of that.