# SimConnect_AICreateNonATCAircraft The **SimConnect\_AICreateNonATCAircraft** function is used to create an aircraft that is not flying under {{< glossterm >}}atc{{< /glossterm >}} control (so is typically flying under {{< glossterm >}}vfr{{< /glossterm >}} rules). {{< callout context="note" title="NOTE" icon="outline/bulb" >}} This function is a **legacy** function and only works with **non-modular aircraft**. In Microsoft Flight Simulator 2024 we recommend you use `SimConnect_AICreateNonATCAircraft_EX1`, which can be used with legacy **and** modular aircraft. {{< /callout >}}   ##### Syntax ``` cpp HRESULT SimConnect_AICreateNonATCAircraft( HANDLE hSimConnect, const char* szContainerTitle, const char* szTailNumber, SIMCONNECT_DATA_INITPOSITION InitPos, SIMCONNECT_DATA_REQUEST_ID RequestID ); ```   ##### Parameters
ParameterDescriptionType
hSimConnectHandle to a SimConnect object.Integer
szContainerTitle

Null-terminated string containing the container title. The container title is found in the aircraft.cfg file.

IMPORTANT! This title must be in an aircraft Preset.Alternatively, the aircraft title can be obtained via the Aircraft Selector (DevMode->Windows->Aircraft selector). Finally, the information can be found using the SimConnect_EnumerateSimObjectsAndLiveries function. Examples of aircraft titles:

  1. title=Boeing 747-8f Asobo
  2. title=DA62 Asobo
  3. title=VL3 Asobo
String
szTailNumberNull-terminated string containing the tail number. This should have a maximum of 12 characters.String
InitPosSpecifies the initial position, using a SIMCONNECT_DATA_INITPOSITION structure.Integer
RequestIDSpecifies the client defined request ID.String
  ##### 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 A non-{{< glossterm >}}atc{{< /glossterm >}} aircraft can be on the ground or airborne when it is created by this function. The following exception can be caused by this function (refer to the [SIMCONNECT\_EXCEPTION](../structures-and-enumerations/simconnect-exception/) enum for more details): - `SIMCONNECT_EXCEPTION_CREATE_OBJECT_FAILED`   Refer to the remarks for [SimConnect\_AICreateEnrouteATCAircraft](simconnect-aicreateenrouteatcaircraft/).