DataObject::SetInternalDataType

Description

Set internal data type of one Column/MatrixObject.

Syntax

BOOL SetInternalDataType( UINT nType, DWORD dwFlags = 0 )

Parameters

nType
[input] Data type enum FSITYPE {
FSI_DOUBLE,
FSI_REAL,
FSI_SHORT,
FSI_LONG,
FSI_CHAR,
FSI_TEXT,
FSI_MIXED,
FSI_BYTE,
FSI_USHORT,
FSI_ULONG,
FSI_COMPLEX,

};

dwFlags
[input] OCD_* options defined in oc_const.h. Not all options are allowed for all derived classes.
MatrixObject -
set OCD_RESET_VIEW to reset the view modes to data
set OCD_RESTORE to backup the data and attempt to restore it after changing type

Return

TRUE for success, FALSE for failure.

Examples

EX1

// Convert the internal storage type for data to BYTE
// Keep the data (reduced resolution) and the current View mode
void    DataObject_SetInternalData_ex1()
{
    MatrixPage mp;
    mp.Create("origin");
    MatrixLayer mlay(mp.GetName());
    
    if(!mlay) return;
    MatrixObject mobj = mlay.MatrixObjects(0); // Most Matrix windows in Origin have only one MatrixObject
    if(mobj.SetInternalData(FSI_BYTE, OCD_RESTORE))
        out_str("successfully converted into BYTE matrix");
    else
        out_str("conversion failed");
}

Remark

Set the internal data type for all the matrix objects in the layer. If matrix is already the correct internal type, this function will do nothing. If the matrix only has image without data, bSaveData set to TRUE will convert the image into data so that HasData will become TRUE after this command.

See Also

DataObject::GetInternalDataType

header to Include

origin.h