2.2.4.46.68 Worksheet::SeparateLabel

Description

Extract target label from source label row.

Syntax

int SeparateLabel( WksSeparateLabel * pst, BOOL bUndo = FALSE )

Parameters

pst
[input]
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

};
bUndo
[input] undo

Return

Returns 0 for success

Examples

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);
}

Remark

See Also

wks_sep_label

Header to Include

origin.h