How to write to XMLVar defined LocalVariable

My WASm can send (>H…) type Events with the

execute_calculator_code(command.c_str(), nullptr, nullptr, nullptr);

But I also need to send changes to XMLVAR defined LocalVariables as they can not be changed with an Event.

How do I change the LocalVariable seen in the image

I am confused when it says Left_SINGLE_CODE is
(L:XMLVAR_Baro_Selector_HPA_1) ! (>L:XMLVAR_Baro_Selector_HPA_1)

What do I need to accomplish this action?

What is the difference between (L: and the (>L ?

I have tried to send (>L:XMLVAR_Baro_Selector_HPA_1)
with the execute_calculator_code(command.c_str(), nullptr, nullptr, nullptr);

but nothing happens.

The guy from FSUIPC said most all Lvars are a beta mess but for default stuff, he has everything on hold for the Software Update.

I am confused when it says Left_SINGLE_CODE is
(L:XMLVAR_Baro_Selector_HPA_1) ! (>L:XMLVAR_Baro_Selector_HPA_1)

> means set. Placing a value in front means “use this as the value to set” and the ! in this case I think means invert since it’s a bool.

Try using your execute_calculator_code and doing something like 0 (>L:XMLVAR_Baro_Selector_HPA_1) or 1 (>L:XMLVAR_Baro_Selector_HPA_1).

Thanks, got it working

1 Like

For lvars, you should use set_named_variable_value rather than execute_calculator_code - get the id first using check_named_variable.

I’m working on lvar access from FSUIPC at the moment. I should hopefully have a beta release out in 3-4 weeks.

John