2.1.14.3.30 set_user_info


Description

Add/Update a user binary storage using a Tree into the OriginObject

Syntax

bool set_user_info( OriginObject & obj, string & strName, const TreeNode & trUserInfo )

Parameters

obj
[input] Origin Object to set the storage
strName
[input|output] the name of the storage, it'll remove characters not allowed in tag name
trUserInfo
[input] the tree to save

Return

true if successfully set the storage,

false if obj is invalid or the fail to set storage

Examples

EX1

// Active window should be a worksheet
void set_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);
}

Remark

See Also

get_user_info

Header to Include

origin.h

Reference