• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

MSFS Setting Switches With execute_calculator_code

I'm hoping that someone might be able to help me understand HTML gauges a bit better. I have a WASM module that I'm using to read and write local vars, send K: events and so on but I'm stuck on trying to set a switch position. The following code is extracted from the DA62 config. I'd like to know what string to pass to execute_calculator_code in order to set the switch to any of the 3 positions.


        <Component ID="DEICE_Switch_WingLight_AnnunTest" Node="DEICE_Switch_WingLight_AnnunTest">
            <Update Frequency="0.1">
                (O:IsInit) ! if{
                    1 (&gt;O:IsInit)
                    1 (&gt;O:SwitchState)
            <UseTemplate Name="ASOBO_GT_Switch_3States">
                    (*UP: wingLights on*)
                    (A:LIGHT WING, bool) ! if{ (&gt;K:TOGGLE_WING_LIGHTS) }
                    (*NORM: wingLights off*)
                    (A:LIGHT WING, bool) if{ (&gt;K:TOGGLE_WING_LIGHTS) }
                    0 (&gt;L:XMLVAR_LTS_Test)
                    (*DOWN: annunciator test*)
                    (A:LIGHT WING, bool) if{ (&gt;K:TOGGLE_WING_LIGHTS) }
                    1 (&gt;L:XMLVAR_LTS_Test)
                <STATE0_TEST>(O:SwitchState) 0 ==</STATE0_TEST>
                <STATE1_TEST>(O:SwitchState) 1 ==</STATE1_TEST>
                <STATE2_TEST>(O:SwitchState) 2 ==</STATE2_TEST>
just read them.
I try to interference it, it getting worse.
find out on A320 model behavior "switch multi states". digging till low level xml code