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.
Hi Patrick,
A little more info on what exactly you want to do would make it easier to answer :-> Are you trying to interface between a real external hardware switch and the sim?
Are you trying to toggle an existing bool/panel var within the sim?
Do you want to create your own panel gauge with associated variable (in which case you probably want to create a gauge, not a SimConnect client)? Etc...
SimConnect can be used to do those. Some sim vars aren't actually set as variables but are set by mapping and sending an event, others are set by sending data to a var, etc.
If you haven't yet, look through the sample code included in the SimConnect portion of the SDK. There are examples of doing things like toggling the landing gear, retrieving various types of data, creating AI objects, etc.

OK, one way to do what you want is to have both the gauge and the hardware interfacing module (either .DLL or .EXE) both use SimConnect. The gauge can use the Client Data area functions to create space for a variable in the Client Data area and set a data request to trigger whenever the data changes ...
Hey Patrick,
OK, one way to do what you want is to have both the gauge and the hardware interfacing module (either .DLL or .EXE) both use SimConnect. The gauge can use the Client Data area functions to create space for a variable in the Client Data area and set a data request to trigger whenever the data changes, and the hardware interfacing code can write to that area when the hardware switch changes state, causing the trigger to fire in the gauge side code and it can retrieve the new value from there. The gauge side code can also update the Client Data variable, say when the user uses the mouse to click on the gauge's switch, so other modules can sync with its current state. I haven't done anything with the client data area stuff myself yet, so can only offer the generalities above, but they should point you at the right parts of the SimConnect API to look at (AddToClientDataDefinition for starters).
I've sent off an email to Dave to see if there's an easier way to do what you want and will post if he has an alternative method, but the above should work fairly well.
Hi Tim, Happy New Year to you!
Yes, all rather complex for a mechanism that is already there much more flexibly for recognised FS switches (Sim Events and Sim Vars) -- excepting of course those where MS too omitted to supply them, as in the EFIS ND control switches in the Boeings -- range, mode, etc.
What is really wanted is a way for user- or gauge-defined Events and Variables to be created and thereafter used (and even assigned) just like the built-in ones.
This especially applies to any switch or knob which is "mouse-clickable" in the cockpit. These should always automatically have events and/or variables associated with them. There are too many mouse-only functions, and the Gauge construction system currently allows this to proliferate.
I've made these requests / suggestions time and time again. Maybe one day ...
Best Regards
Pete