Wondering if there is a way to scan and get a listing of the available LVARS and/or Simevents instead of having to manually type them all in everytime?
Please take a moment to read the platform’s guidelines before you get started!
Wondering if there is a way to scan and get a listing of the available LVARS and/or Simevents instead of having to manually type them all in everytime?
Some info for a full list of Lvars...
You can open the behaviors tool and under LocalVariables tab it will display all Lvars used in the project. You can type a key word or multiple words to filter a single or even multiple Lvars so you can track specific Lvars and their behavior(s).
There also could be a method from the debugger but I will let someone else answer for that.
Hello @De-Flight
The simvar being global for all aircraft, there is no way of getting only the simvar that are used by your aircraft.
Best regards,
Yohan
Hello @De-Flight
Unfortunately there is no built in method to get all the LVars used by your aircraft, gathering all Lvars may be possible but it will also return LVars from other planes because Lvars are global, if you opent the Behaviours Windows and in the Lvars tab disable "Show only var set by plane", you will see all the LVars.
You could get only the Lvars set by the plane at the start of the flight but no build in method exist to do this.
Could you explain the case in which you would need this list ?
Best regards,
Yohan
You can get all available lvars in a WASM module by simply by calling the Gauge API function
lvarname = get_name_of_named_variable(id)
in a loop incrementing the id each time and starting with id=0. The lvarname will be empty after the last one is found.
I don't think this is possible by just using SimConnect.
There are various WASM modules and APIs that you can also use for this. My own WASM provides an API (WAPI - see https://github.com/jldowson/FSUIPC_WAPI) and provides the function
void getLvarList(unordered_map<int, string >& returnMap); // Returns a list of lvar names keyed on the lvar id
A C# wrapper is also available - see www.fsuipc.com for the WASM/WAPI package if interested.
5 People are following this question.