Managing AP with simconnect and TransmitClientEvent

SimConnect_MapClientEventToSimEvent(hSimConnectI, AP_ALT_VAR_INC, "AP_ALT_VAR_INC");
SimConnect_TransmitClientEvent(hSimConnectI, 0, AP_ALT_VAR_INC, 0, SIMCONNECT_GROUP_PRIORITY_DEFAULT, 0);

Hello, I’m trying to use some variables usable by SimConnect, but no results. Want to create a C++ app that will manage the AP - in posted example, Altitude. Unfortunately, when I run the program, nothing happens. The most that I could do was toggling AP with

AP_MASTER

Are there any tutorials or something?

I think what’s missing are the parameters. You might want to double-check the documentation at Aircraft Autopilot/Flight Assist Events (flightsimulator.com)
It says “AP_ALT_VAR_INC” needs 2 parameters, [0] is the new altitude and [1] is the AP index (usually 0 I think). Since this needs two parameters, you probably need to call TransmitClientEvent_EX1

I don’t see such entry in SimConnect.h. There’s only

SIMCONNECTAPI SimConnect_TransmitClientEvent(HANDLE hSimConnect, SIMCONNECT_OBJECT_ID ObjectID, SIMCONNECT_CLIENT_EVENT_ID EventID, DWORD dwData, SIMCONNECT_NOTIFICATION_GROUP_ID GroupID, SIMCONNECT_EVENT_FLAG Flags);

You probably need to update your SDK to the latest version if you can’t get it to compile. If you are manually browsing SimConnect.h, there’s an entry down below, they’re not sorted.

Thanks for the info, will check that later :slight_smile: