MatrixLayer::PutSPCBlob

Description

Put the data from an SPC blob into the matrix.

Syntax

BOOL PutSPCBlob( _VARIANT & varBlob )

Parameters

varBlob
[input] the VARIANT blob containing the data

Return

TRUE for success; otherwise FALSE

Examples

EX1

//Put the data from an SPC blob into the matrix 
void MatrixLayer_PutSPCBlob_Ex1()
{
    Object oSpcIO;
    string strPathName = GetOpenBox("*.spc");
    oSpcIO = CreateObject("GSpcIOLib.GSpcIO");    // the GRAMS object used for importing the SPC file
    try
    {
        oSpcIO.OpenFile(strPathName);
    }
    catch(int nErr)
    {
        printf("Faild to open.");
        return;
    }
    _VARIANT varBlob;
    varBlob = oSpcIO.SaveBlob();
    
    MatrixPage mp = Project.MatrixPages(0);
    if(!mp)
        return;
    
    MatrixLayer ml(mp.GetName());
    BOOL bRet = ml.PutSPCBlob(varBlob);
    out_int("Return value from PutSPCBlob is ", bRet);
}

Remark

See Also

header to Include

origin.h