SimConnect_AICreateNonATCAircraft
The SimConnect_AICreateNonATCAircraft function is used to create an aircraft that is not flying under ATC control (so is typically flying under VFR rules).
Syntax
HRESULT SimConnect_AICreateNonATCAircraft(
HANDLE hSimConnect,
const char* szContainerTitle,
const char* szTailNumber,
SIMCONNECT_DATA_INITPOSITION InitPos,
SIMCONNECT_DATA_REQUEST_ID RequestID
);
Parameters
Parameter | Description | Type |
---|---|---|
hSimConnect | Handle to a SimConnect object. | Integer |
szContainerTitle |
Null-terminated string containing the container title. The container title is found in the aircraft.cfg file. Alternatively, the aircraft title can be obtained via the Aircraft Selector (DevMode->Windows->Aircraft selector). Examples of aircraft titles:
|
String |
szTailNumber | Null-terminated string containing the tail number. This should have a maximum of 12 characters. | String |
InitPos | Specifies the initial position, using a SIMCONNECT_DATA_INITPOSITION structure. | Integer |
RequestID | Specifies 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.
Return value | Description |
---|---|
S_OK | The function succeeded. |
E_FAIL | The function failed. |
Remarks
A non-ATC 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 enum for more details):
SIMCONNECT_EXCEPTION_CREATE_OBJECT_FAILED
Refer to the remarks for SimConnect_AICreateEnrouteATCAircraft.
See Also
- SimConnect API Reference
- SimConnect_AICreateEnrouteATCAircraft.
- SimConnect_AICreateParkedATCAircraft
- SimConnect_AISetAircraftFlightPlan