Extremely easy.
Here is a basic 'custom' L:var part animation. With this, you can endlessly change it to do other things.
Note the (command) strings and the tooltip zone. You will change those zones to fit what you need.
This is in FS2004 format.
<part>
<name>folding_seat_rh</name>
<animation>
<parameter>
<code>(L:Right Seat Fold, bool) 100 *</code>
<lag>70</lag>
</parameter>
</animation>
<mouserect>
<cursor>Hand</cursor>
<tooltip_text>Fold Seat</tooltip_text>
<callback_code>(L:Right Seat Fold, bool) ! (>L:Right Seat Fold, bool)</callback_code>
</mouserect>
</part>
Here is one in FSX format.
Top FSX Animation Section;
<Animation name="ave_glovebox" guid="6B3D9C91-6337-4a20-9B32-0024B9565F06" length="100" type="Sim" typeParam2="ave_glovebox" typeParam="AutoPlay" />
Bottom FSX Animation Section
<PartInfo>
<Name>ave_glovebox</Name>
<Animation>
<Parameter>
<Code>(L:AVEgloveBOX, bool) 100 *</Code>
<Lag>50</Lag>
</Parameter>
</Animation>
<MouseRect>
<Cursor>Hand</Cursor>
<TooltipText>Open Glove Box</TooltipText>
<CallbackCode>
(L:AVEgloveBOX, bool) ! (>L:AVEgloveBOX, bool)
</CallbackCode>
</MouseRect>
</PartInfo>
Note on the second one, the speed (Lag) is at 50. That is very slow. Usually a switch is 400, very quick. Slow is 50 to 100.
The '100' on the top string indicates your animation scale, 100 points. Usually stock FS switches use 50 KF's or 'key frames'.
These animations are added to your XML parts list for Gmax in the SDK pack, 'bin' folder in the Environment section for FSX and for FS2004 it is in the Gamepacks/FS2004/Plugins folder.
EDIT; Small note. When recreating new versions off of these, note that there is a > symbol in the second of the bottom command strings;
(L:AVEgloveBOX, bool) ! (>L:AVEgloveBOX, bool)
Bill