ReplaceMap
Update the Categorical Map with a customized one
BOOL ReplaceMap(vector<string>&vstrKey);
True for success
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 } } }
Column::SetAsCategorical, Column::GetCategoricalMap
origin.h