OriginObject::PutBinaryStorage

Description

Add/Update a binary storage using a Tree

Syntax

BOOL PutBinaryStorage( LPCSTR lpcszName, const TreeNode & tn )

Parameters

lpcszName
[input] name of the binary storage. The name string must be a valid C identifier name. A valid C Identifier name must begin with a letter and can contain only letters, numbers, and underscore characters.
tn
[input] the tree to save

Return

Examples

EX1

void OriginObject_PutBinaryStorage_Ex1(string strPageName = "Book1", string strStorageName = "SomeJunk")
{
    Page pg = Project.Pages(strPageName);
    if(pg)
    {
        Tree tr;
        
        tr.Company.strVal = "ACME Corp";
        tr.operator.strVal = "Joe Smith";
        tr.DAQ.start.dVal = 0;
        tr.DAQ.stop.dVal = 0.5;
        pg.PutBinaryStorage(strStorageName, tr); 
        
        Tree trTest;
        pg.GetBinaryStorage(strStorageName, trTest);
        out_tree(trTest);
    }
    else
        printf("Not this page named %s in project\n", strPageName);
}

Remark

See Also

OriginObject::GetBinaryStorage, get_user_info, set_user_info

header to Include

origin.h