# SimConnect_ClearDataDefinition The **SimConnect\_ClearDataDefinition** function is used to remove all simulation variables from a client defined data definition.   ##### Syntax ``` cpp HRESULT SimConnect_ClearDataDefinition( HANDLE hSimConnect, SIMCONNECT_DATA_DEFINITION_ID DefineID ); ```   ##### Parameters {{< table-wrapper >}} | Parameter | Description | Type | |---------------|---------------------------------------------------------|---------| | *hSimConnect* | Handle to a SimConnect object. | Integer | | *DefineID* | Specifies the ID of the client defined data definition. | Integer | {{< /table-wrapper >}}   ##### 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 >}}   ##### Example ``` cpp static enum DATA_DEFINE_ID { DEFINITION_1, DEFINITION_2 }; .... hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, "Kohlsman setting hg", "inHg"); hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, "Indicated Altitude", "feet"); hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, "Plane Latitude", "degrees"); hr = SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_1, "Plane Longitude", "degrees"); .... hr = SimConnect_ClearDataDefinition(hSimConnect, DEFINITION_1); .... ```   ##### Remarks Use this function to permanently delete a data definition. To temporarily suspend data requests see the remarks for the [SimConnect\_RequestDataOnSimObject](simconnect-requestdataonsimobject/) function.