Sending Data to simconnect via an Event

I’m trying to write to com1 standby. I’m using the SetData sample and trying to modify it as a learning experience.

I get an exception saying an unrecognized name.
hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_6, “Com Stby Radio Set Hz”, “MHz”, SIMCONNECT_DATATYPE_FLOAT64);

I think its because I’m using an event where it wants a simVar.

I understand there’s a difference, but I don’t understand how to implement the event.

Can anyone direct me to a tutorial or write up or example? Or anything that can help?
Thanks.