How do I know the answer is complete for EnumerateSimObjectsAndLiveries?

Via simconnect I get from MSFS2024 the list as expected. The list of structures comes in my case in many (33) arrays of size 79, then a few arrays of various sizes.

To request the models I use (c# managed code):

sc.EnumerateSimObjectsAndLiveries(Sim.Requests.GET_MODELS_AND_LIVERIES, SIMCONNECT_SIMOBJECT_TYPE.AIRCRAFT);
sc.EnumerateSimObjectsAndLiveries(Sim.Requests.GET_MODELS_AND_LIVERIES, SIMCONNECT_SIMOBJECT_TYPE.HELICOPTER);
sc.EnumerateSimObjectsAndLiveries(Sim.Requests.GET_MODELS_AND_LIVERIES, SIMCONNECT_SIMOBJECT_TYPE.HOT_AIR_BALLOON);

The subscription to the answer event is:

sc.OnRecvEnumerateSimobjectAndLiveryList += new SimConnect.RecvEnumerateSimobjectAndLiveryListEventHandler(RecvModelList);

How/When do I know that the simulator is done sending these answer arrays and I should not expect more?

Help is sincerely appreciated!

I found out the answer…

In RecvModelList(SimConnect sender, SIMCONNECT_RECV_ENUMERATE_SIMOBJECT_AND_LIVERY_LIST data)

if (data.dwEntryNumber + 1 == data.dwOutOf)
{
// Read all models from the simulator.
}

1 Like