2.1.26.56 tree_put_binary_storage


Description

Put a TreeNode into a binary storage in an origin obeject.

Syntax

bool tree_put_binary_storage( TreeNode & trn, OriginObject & ObjTarget, LPCSTR lpcszName )

Parameters

trn
[input]tree node to put into a binary storage
ObjTarget
[modify]Origin obejct holding a binary storage
lpcszName
[input]pointer to the name of the binary storage

Return

true for success, false for error

Examples

EX1

void tree_put_binary_storage_Ex1( )
{
	string strStorageName = "SomeJunk" ;
	
    Page pg = Project.Pages(-1); // get active page
    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;
        tree_put_binary_storage(tr, pg, strStorageName);
 
        Tree trTest;
        tree_get_binary_storage(trTest,pg,strStorageName); // to get binary info that just put to page to check
        out_tree(trTest);
    }
    else
        printf("No active page in this Project\n");
}

Remark

See Also

tree_get_binary_storage

Header to Include

origin.h

Reference