SeparateLabel
Extract target label from source label row.
int SeparateLabel( WksSeparateLabel * pst, BOOL bUndo = FALSE )
struct WksSeparateLabel { int c1; //start column index int c2; //end column index int nSrcType; //source label row int nDstType; //target label row int rule; //if rule = RULE_INSIDE, it will look for label within () or []; if rule = RULE_SEPARATOR, it will extract by separator int sep; //Seperator such as " ", ",", "-", ";" and "/" BOOL bRemoveSource; //remove target label from source label row };
Returns 0 for success
EX1
void Worksheet_SeparateLabel() { Worksheet wks = Project.ActiveLayer(); WksSeparateLabel stSeparateLabel; stSeparateLabel.c1 = 0; stSeparateLabel.c2 = -1;//whole wke stSeparateLabel.nSrcType = RCLT_LONG_NAME; stSeparateLabel.nDstType = RCLT_UNIT; stSeparateLabel.rule = RULE_SEPARATOR; stSeparateLabel.sep = '-'; stSeparateLabel.bRemoveSource = true; wks.SeparateLabel(&stSeparateLabel, false); }
wks_sep_label
origin.h