|
|
C_GetDataType |
There are 6 functions for getting and setting data: C_GetDataDouble, C_GetDataInteger, C_GetDataString, C_SetDataDouble, C_SetDataInteger and C_SetDataString. In order to know which to call you must first call C_GetDataType. The value returned in DataType determines which of these functions to call.
void C_GetDataType(
);
The handle of the object which owns the data.
Points to a null-terminated string containing the name of the data item. This is the same name as used in OrcaFlex script files. To find what the name is for a particular data item you should select the data item on the OrcaFlex data form and press F7. For more information see the batch processing section of the OrcaFlex documentation.
Points to a variable which receives the data type. Can be one of the following values:
dtDouble which means the data item is a floating point value and you should call C_GetDataDouble to get the data or C_SetDataDouble to set the data.dtInteger which means the data item is an integer value and you should call C_GetDataInteger to get the data or C_SetDataInteger to set the data.dtIntegerIndex which means that the data item is a 1-based integer index. You should call C_GetDataInteger to get the data or C_SetDataInteger to set the data. This data item will, in general, represent an index into a list: the first item in the list will always have the index 1.dtBoolean which means the data item is a boolean value and you should call C_GetDataInteger to get the data or C_SetDataInteger to set the data. False is represented by zero, and true by any non-zero value.dtString which means the data item is a string value and you should call C_GetDataString to get the data or C_SetDataString to set the data.dtVariable which means that the data item is variable. To get the data you call either C_GetDataDouble or C_GetDataString as determined by a call to C_GetVariableDataType. To set the data you call C_SetDataDouble if you want to set a constant value or C_SetDataString if you want to set a variable value.| Note: | For backwards compatibility reasons the dtBoolean data type is only returned if the EnableBooleanDataType policy has been activated. If this policy is not activated then boolean data is treated as being of dtString type with possible values Yes and No. |
Points to a variable in which the status result for the function call will be returned.
The Unicode function name is C_GetDataTypeW and the ANSI function name is C_GetDataTypeA.
C_DataRequiresIndex, C_DeleteDataRow, C_GetDataRowCount, C_GetDataDouble, C_GetDataInteger, C_GetDataString, C_GetVariableDataType, C_InsertDataRow, C_SetDataRowCount, C_SetDataDouble, C_SetDataInteger, C_SetDataString.