2.2.4.24.12 Layer::GetSpecialGraphicObjectsCollection

Description

Returns the collection of only those with the given prefix.

Syntax

BOOL GetSpecialGraphicObjectsCollection( Collection<GraphObject> & coll, LPCSTR lpcszPrefix )

Parameters

coll
[output] collection of graph objects
lpcszPrefix
[input] prefix of the graph objects' names

Return

return true for success

Examples

EX1

//Output the collection of only those with the "_" prefix. 
void Layer_GetSpecialGraphicObjectsCollection_ex1(string str = "_")
{
    GraphLayer    gly = Project.ActiveLayer();
    if( gly.IsValid() )
    {
        Collection<GraphObject>        coll;
        if ( gly.GetSpecialGraphicObjectsCollection(coll, str) )
        {
            GraphObject                grobj;
            foreach(grobj in coll)
            {
                string                strName;
                strName = grobj.GetName();
                out_str(strName);
            }
        }
    }
    else
        out_str( "No graph layer is active" );
}

Remark

See Also

Header to Include

origin.h