2.1.14.3.12 info_set_section


Description

Set a section into an OriginObject's Info.

Syntax

bool info_set_section( OriginObject & obj, TreeNode & trSection, LPCSTR lpcszStorageSection )

Parameters

obj
[input] the OriginObject to set the section into
trSection
[input] the tree node containing the section
lpcszStorageSection
[input] pointer to the storage and section name

Return

If success then true else false

Examples

EX1

void info_set_section_ex1()
{
    Tree    trSection;
    trSection.user.Name.strVal = "Joe";
    trSection.user.var.nVal = 1;
    
    Page     pg = Project.Pages(); // get active page
    bool bRet = info_set_section(pg, trSection, "User.Variables");
    if ( bRet )
        out_str("Section info updated successfully.");
}

Remark

See Also

info_get_section

Header to Include

origin.h

Reference