MatrixObject::GetLabel

Description

Get the matrix object label by reference.


Get the matrix object labels.

Syntax

int GetLabel(string &strLabel)

string GetLabel()

Parameters

strLabel
[output] the label of matrix object

Return

Return 0 if no label, else the length of label text.

Return the matrix object label string.

Examples

EX1

//Get the first matrixobject label by reference.
void MatrixObject_GetLabel_ex1()
{
        MatrixLayer ml = Project.ActiveLayer();
        if ( ml )
        {
                MatrixObject mo = ml.MatrixObjects(0);
                
                string str;
                if( mo.GetLabel(str) > 0 )//return 0 if no labels
                        out_str(str);
        }
}

EX2

//Get the first matrixobject lable.
void MatrixObject_GetLabel_ex2()
{
    MatrixLayer ml = Project.ActiveLayer();
    if ( ml )
    {
        MatrixObject mo = ml.MatrixObjects(0);     
        string str = mo.GetLabel();//return labels
        out_str(str);
    }
}

Remark

See Also

MatrixObject::SetLabel, MatrixObject::GetName, MatrixObject::GetExtendedLabel, MatrixObject::GetLongName, MatrixObject::GetComments, MatrixObject::GetUnits, MatrixObject::GetParameters

header to Include

origin.h