get_user_info

 

Description

Get a user binary storage by name as a Tree from the OriginObject

Syntax

bool get_user_info( OriginObject & obj, LPCSTR lpcszName, TreeNode & trUserInfo )

Parameters

obj
[input] Origin Object to get the storage
lpcszName
[input] the name of the storage
trUserInfo
[output] the tree to get the storage

Return

true if successfully get the storage tree,

false if obj is invalid or the storage tree not found

Examples

EX1

// Active window should be a worksheet
void get_user_info_ex1()
{
    Worksheet wks = Project.ActiveLayer();
    string strInfoName = "WksInfo";
    Tree trWksInfo;
    trWksInfo.AddTextNode("Worksheet has user info", "Notes");
    trWksInfo.AddNumericNode(0.5, "Number");
    bool bRet = set_user_info(wks, strInfoName, trWksInfo);
    
    Tree tr;
    bRet = get_user_info(wks, strInfoName, tr);
    out_tree(tr);
}

Remark

See Also

set_user_info

header to Include

origin.h

Reference