I’m working on an implementation using a WASM Module. In some cases, I make use of execute_calculator_code. If you are interested, I wrote a tutorial that explains how to use WASM in combination with SimConnect Client Area Data here.
All works perfect in combination with numeric values, such as:
execute_calculator_code("2 (>L:A32NX_EFIS_L_OPTION,enum)", nullptr, nullptr, nullptr);
This puts the value “2” in the LVar “A32NX_EFIS_L_OPTION”.
But how can I use a string as parameter? Below example seems not to work.
execute_calculator_code("ABC123 (>A:ATC FLIGHT NUMBER,string)", nullptr, nullptr, nullptr);
I tried with a lot of formats, but with no success:
execute_calculator_code(" 'ABC123' (>A:ATC FLIGHT NUMBER,string)", nullptr, nullptr, nullptr);
execute_calculator_code(" [ABC123] (>A:ATC FLIGHT NUMBER,string)", nullptr, nullptr, nullptr);
execute_calculator_code(" \"ABC123\" (>A:ATC FLIGHT NUMBER,string)", nullptr, nullptr, nullptr);
I wonder if it is possible after all?
Before you ask, I can set the variable directly from my SimConnect Client using SetDataOnSimObject
, so I know the variable does work and is storing the value.