Jump to content
The simFlight Network Forums

Reading LVar


Recommended Posts

*** Moved to .Net dll client sub-forum ***


I am currently making my own C# winform application and i cant seem to get the readLvar to be working. I am trying to read the passengers boarding from the GSX pro for MSFS. This is my code.


myTextbox.Text = FSUIPCConnection.ReadLVar("L:FSDT_GSX_NUMPASSENGERS_BOARDING_TOTAL").ToString();
Console.WriteLine("Reading passengers on board from GSX " + " - " + FSUIPC.FSUIPCConnection.ReadLVar("L:FSDT_GSX_NUMPASSENGERS_BOARDING_TOTAL"));

Data will be 0 and i dont know why. Am i missing something? Using the latest FSUIPC 7. I have the FSUIPC_lvar installed in the ocmmunity folder. I hope to get some guidance here. thanks

Edited by John Dowson
Moved to .Net client dll sub-forum
Link to comment
Share on other sites

I have moved your post to Paul's .Net client sub-forum, but if an lvar doesn't exist it may be due to the lvar scan performed by the WASM was done before the lvar was created/available. If this is the case, you can adjust the WASM ini parameter LvarScanDelay, or call the reload function to get the WASM to rescan for lvars.

Link to comment
Share on other sites

When you get 0 back it usually means the LVar doesn't exist.

Please see John's advice above.

Alternatively, if this is a new application you might consider using the new MSFSVariableServices class. It's much faster than the ReadLVar() method, although it's a bit more complicated to use. One advantage is that it has an event that tells you when the LVars have been scanned and are ready to use.

See this post for details:


Or download the MSFSVariableServices example application from the website:



Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.