2.2.3.2.6 CategoricalMap::ReplaceMap

Description

Update the Categorical Map with a customized one

Syntax

BOOL ReplaceMap(vector<string>&vstrKey);

Parameters

vector<string>
[input]Input user defined categorialmap

Return

True for success

Examples

void MyCategoricalMap()
{ 
    Worksheet wks=Project.ActiveLayer();
    if (wks)
    { 
		vector<string> vstrKey={"aa", "cc", "bb", "dd"};  //design your own categories map
		for(int ii=0;ii<5;ii+=2){
		wks.Columns(ii).SetAsCategorical(CMT_NOMINAL); //set column into categorical with normal mode
                wks.Columns(ii).GetCategoricalMap().ReplaceMap(vstrKey);  //update the categorical map
		}       
    }
}

Remark

See Also

Column::SetAsCategorical, Column::GetCategoricalMap

Header to Include

origin.h