SimConnect_AddToClientDataDefinition - incorrect example code

Hi team, when I implemented the MobiFlight WASM module I saw that the example
code for this particular method is not correct. Link:
https://docs.flightsimulator.com/html/index.htm#t=Programming_Tools%2FSimConnect%2FAPI_Reference%2FEvents_And_Data%2FSimConnect_AddToClientDataDefinition.htm
Example code:

static enum EVENT_ID {
    EVENT_MY_EVENT
    EVENT_DME
    };
hr = SimConnect_MapClientEventToSimEvent(hSimConnect, EVENT_MY_EVENT, "Custom.Event");
SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_MY_EVENT, 0, SIMCONNECT_GROUP_PRIORITY_HIGHEST, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY);
      
hr = SimConnect_MapClientEventToSimEvent(hSimConnect, EVENT_DME, "DME_SELECT");
SimConnect_TransmitClientEvent(hSimConnect, 0, EVENT_DME, 2, SIMCONNECT_GROUP_PRIORITY_DEFAULT, SIMCONNECT_EVENT_FLAG_GROUPID_IS_PRIORITY); 

The code clearly doesn’t use the documented method

HRESULT SimConnect_AddToClientDataDefinition(
    HANDLE  hSimConnect,
    SIMCONNECT_CLIENT_DATA_DEFINITION_ID  DefineID,
    DWORD  dwOffset,
    DWORD  dwSizeOrType,
    float  fEpsilon = 0,
    DWORD  DatumID = SIMCONNECT_UNUSED
    );

As a general feedback, the entire group of methods related to Events and
Custom Data Definitions is really hard to understand and it took me forever to
figure it out.

Hello, Obviously a mistake. Our tech writer will fix that, thanks for
reporting it. The SDK is providing very simple examples on how to use events
and read/write custom data. We are open to suggestions on how to improve it.
What piece of information do you think is missing to make it easier to
understand? Regards, Sylvain