2.1.14.3.9 get_user_parameters


Description

get the list of user variables that has been saved into the column, empty ones will be skipped

Syntax

int get_user_parameters( DataObject & obj, vector<string> & vsNames, vector<string> & vsValues, bool bGetEmpty = false, bool bLinkingTranslation = true)

Parameters

obj
[input] column contains user variables
vsNames
[output] string vector used for saving user name
vsValues
[output] string vector used for saving user values
bGetEmpty
[input] if true, will get all paramters, else will only get those with value
bLinkingTranslation
[input] whether get values with cell linking translation

Return

If success then return the number of user

Examples

EX1

//For this example to run, make sure the active window is a workbook window
void get_user_parameters_ex1(int nCol =1)
{
    Worksheet wks = Project.ActiveLayer();
    Column cc = wks.Columns(nCol);
    if(cc)
    {
        vector<string> vsNames, vsValues;
        int nSize = get_user_parameters(cc, vsNames, vsValues);
        for(int ii = 0; ii < nSize; ii++)
            printf("%s = %s\n", vsNames[ii], vsValues[ii]);
    }
}

Remark

See Also

set_user_parameters

Header to Include

origin.h

Reference