# 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 ``` cpp HRESULT SimConnect_EnumerateSimObjectsAndLiveries( HANDLE hSimConnect, SIMCONNECT_DATA_REQUEST_ID RequestID, SIMCONNECT_SIMOBJECT_TYPE Type ); ```   ##### Parameters
ParameterDescriptionType
hSimConnectHandle to a SimConnect object.Integer
RequestIdSpecifies 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 balloons.
  • SIMCONNECT_SIMOBJECT_TYPE_ANIMAL: Retrieve only animals.
  • SIMCONNECT_SIMOBJECT_TYPE_USER_AVATAR: Retrieve the user avatar.
Integer
  ##### Return Values The function returns an **HRESULT**. Possible values include, but are not limited to, those in the following table. {{< table-wrapper >}} | Return value | Description | |--------------|-------------------------| | S\_OK | The function succeeded. | | E\_FAIL | The function failed. | {{< /table-wrapper >}}   ##### 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).