SimConnect_EnumerateSimObjectsAndLiveries

The SimConnect_EnumerateSimObjectsAndLiveries function is used to retrieve the list of spawnable SimObjects (and the name of their livery if applicable) that can be used with SimConnect_AICreate_* functions.

 

Syntax
HRESULT SimConnect_EnumerateSimObjectsAndLiveries(
    HANDLE  hSimConnect,
    SIMCONNECT_DATA_REQUEST_ID  RequestID,
    SIMCONNECT_SIMOBJECT_TYPE Type
    );

 

Parameters
Parameter Description Type
hSimConnect Handle to a SimConnect object. Integer
RequestId Specifies the client defined request ID. Integer
Type

Specifies the type of SimObjects that will be retrieved by the function:

  • SIMCONNECT_SIMOBJECT_TYPE_USER: SimObject types selectable by the user (airplane, helicopter and hot air balloon)
  • SIMCONNECT_SIMOBJECT_TYPE_ALL: All types listed in this note
  • SIMCONNECT_SIMOBJECT_TYPE_AIRCRAFT: Retrieve only airplanes
  • SIMCONNECT_SIMOBJECT_TYPE_HELICOPTER: Retrieve only helicopters
  • SIMCONNECT_SIMOBJECT_TYPE_BOAT: Retrieve only boats
  • SIMCONNECT_SIMOBJECT_TYPE_GROUND: Retrieve only ground vehicles
  • SIMCONNECT_SIMOBJECT_TYPE_HOT_AIR_BALLOON: Retrieve only hot air ballons
  • SIMCONNECT_SIMOBJECT_TYPE_ANIMAL: Retrieve only animals
Integer

 

Return Values

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return value Description
S_OK The function succeeded.
E_FAIL The function failed.

 

Remarks

This function should be used to retrieve the list of spawnable SimObjects (and the name of their liveries if applicable) that are mandatory information used by SimConnect_AICreate* functions. This function can send two kinds of messages :

  • A SIMCONNECT_RECV_ENUMERATE_SIMOBJECT_AND_LIVERY_LIST message which contains the list (or a part of the list) of all possible combinations.
  • A SIMCONNECT_EXCEPTION message with the SIMCONNECT_EXCPETION_INTERNAL ID, which implies that something went wrong while creating the list to retrieve to the client (which should never happen).