C_GetDataRowCount

Call C_GetDataRowCount to find the row count for a column of indexed data, and therefore determine the range of valid indices.

An example of indexed data is the section data (line type, section length, target segment length etc.) for an OrcaFlex line. Calling C_GetDataRowCount for section data names (e.g. "LineType", "Length", "TargetSegmentLength") simply returns the number of sections in the line. In other words this is equivalent to calling C_GetDataInteger for the data name "NumberOfSections".

A value of -1 is returned for data which is not indexed (e.g. object name, line contents density).

void C_GetDataRowCount(

TOrcFxAPIHandle ObjectHandle,

LPCTSTR lpDataName,

int *lpRowCount,

int *lpStatus

);

Parameters

ObjectHandle (IN)

The handle of the object which owns the data.

lpDataName (IN)

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.

lpRowCount (OUT)

Points to a variable which receives the row count. A value of -1 is returned for data which is not indexed.

lpStatus (OUT)

Points to a variable in which the status result for the function call will be returned.

Unicode and ANSI

The Unicode function name is C_GetDataRowCountW and the ANSI function name is C_GetDataRowCountA.

See also

C_DataRequiresIndex, C_DeleteDataRow, C_GetDataDouble, C_GetDataInteger, C_GetDataString, C_GetDataType, C_InsertDataRow, C_SetDataRowCount, C_SetDataDouble, C_SetDataInteger, C_SetDataString.