Reading an aircraft string using execute_calculator_code issue

This piece of code, that will be compiled as wasm, does not return ATC _ID as should do:

PCSTRINGZ barcode;
execute_calculator_code((PCSTRINGZ)"(A:ATC ID, string)", (FLOAT64*)NULL, (SINT32*)NULL, &barcode);

barcode is unreadable…
Any clues ?

Thanks in advance

/Mario

1 Like

same here, using return as string doesn’t work

I’d love a solution to this but everything I’ve read implies that this API wasn’t meant for strings. Questionable lifetime wrt a memory leak.

Instead you can use SimConnect within the gauge, the same way this is done externally (AddToDataDefintion etc). The only problem is you can only read A: vars and not C:fs9gps: or L: vars.