2.2.4.28.11 MatrixObject::GetExtendedLabel

Description

Get the matrix object label by label type.

Syntax

BOOL GetExtendedLabel(string &str, int nn, BOOL bByType = TRUE)

Parameters

str
[output] the label of matrix object
nn
[input] the type of extended label. It must come from the following enumeration:
typedef enum { 
RCLT_INVALID = -1, 
RCLT_LONG_NAME, 
RCLT_UNIT, 
RCLT_COMMENT, 
RCLT_PARAM, 
} ROWCOLLABELTYPE;

plus an optional offset for RCLT_PARAM, like RCLT_PARAM + 1, RCLT_PARAM + 2, etc.

bByType
[input] must be true

Return

Returns TRUE if successful, else return FALSE.

Examples

EX1

//Output the unit label of the matrixobject.
void MatrixObject_GetExtendedLabel_ex1()
{
	MatrixLayer ml = Project.ActiveLayer();
	if ( ml )
	{
		MatrixObject mo = ml.MatrixObjects(0);
		
		string strUnits;
		if( mo.GetExtendedLabel(strUnits, RCLT_UNIT) )
			out_str(strUnits);
	}
}

Remark

See Also

MatrixObject::SetExtendedLabel, MatrixObject::GetLabel, MatrixObject::GetName, MatrixObject::GetLongName, MatrixObject::GetComments, MatrixObject::GetUnits, MatrixObject::GetParameters

Header to Include

origin.h