ProcUnit::GetUnitData

Gets processing unit data

int GetUnitData(
   ProcUnit     *ptrProcUnit,
   int  dataNo,
   ANYTYPE      *data,
   int  option
)

int GetUnitData(
   ProcUnit     *ptrProcUnit,
   TCHAR        *dataIdent,
   ANYTYPE      *data,
   int  option
)

Parameters
*ptrProcUnit
Pointer to the processing unit
dataNo
Data No
*dataIdent
Pointer to the data identification name
*data
Pointer to the obtained data storage area
option
The options that can be obtained are as follows:
0: Gets data about Point/Angle/Area/Distance/Equation of a straight line for output.
1: Gets data about Point/Angle/Area/Distance/Equation of a straight line for display.
You can not obtain the other data by specifing the option.
If the parameter is not specified, the same as specify 0.

Return Value
Returns 0 when the processing unit data is successfully obtained.
Otherwise returns a non-zero value.

Description
Gets the processing unit data of a processing item.

Example
    int Sample::GetUnitData(ProcUnit *ptrProcUnit, int dataNo, ANYTYPE *data)
    {

        // Get the pointer to the inner processing unit

        ProcUnit *ptrInnerUnit = ptrProcUnit->GetInnerUnit(0);

        // Gets the processing unit data of an inner processing unit

        ptrInnerUnit->GetUnitData(ptrProcUnit, 0, data, 1)
    }