2.1.14.3.31 set_user_parameters


Description

set user-defined-variabels to a column and also show the label rows in the worksheet

Syntax

bool set_user_parameters( DataObject & obj, const vector<string> & vsNames, const vector<string> & vsValues, bool bShowLabel = true )

Parameters

obj
[output] save user-defined-variables
vsNames
[input] contains user names
vsValues
[input] contains user values
bShowLabel
[input] whether show labels in grid. Default is true.

Return

True for success; otherwise false

Examples

EX1

//For this example to run, the active window must be a workbook
void awl(int nCol = 1, string strNames = "Room Temperature|Start Time|End Time", string strVals = "12|12:34|23:45")
{
    vector<string> vsNames, vsValues;
    strNames.GetTokens(vsNames, '|');
    strVals.GetTokens(vsValues, '|');
    
    Worksheet wks = Project.ActiveLayer();
    Column cc = wks.Columns(nCol);
    if(cc)
        set_user_parameters(cc, vsNames, vsValues);
}

Remark

See Also

get_user_parameters

Header to Include

origin.h

Reference