MapClientEventToSimEvent reuse Event ID

In my program I want to give the user the chance to invoke any event from this page in the sim. So every time the user specifies a new event, I call
SimConnect_MapClientEventToSimEvent with the same Event ID (for example 10), but with a different Event Name. Unfortunately, I get a
SIMCONNECT_EXCEPTION_EVENT_ID_DUPLICATE error. It seems once I mapped an ID to an Event Name, there is no way to “unmap” the ID from the Event.

Is this true? Or can I somehow “unmap” it, so I can reuse the same ID?

Hello @DuckyThunder240

That’s correct, you cannot explicitly unmap individual events. They will be cleared when the SimConnect client is closed.
However, you can add your events to a notification group with SimConnect_AddClientEventToNotificationGroup. When calling SimConnect_ClearNotificationGroup, the events in that group will be cleared as well.

Regards,
Sylvain