GetObjectType
The type of the graphic object as a string.
string GetObjectType( int * pnTypeID = NULL, BOOL bDetailedString = FALSE)
the string representing the type of the graphic object.
EX1
void GraphObjectBase_GetObjectType_ex1() { GraphPage gp; gp.Create("origin"); GraphLayer gl(gp.GetName(),0); GraphObject grobj; // Loop over all the graphic objects in the layer and for each of them // display its type as string: foreach (grobj in gl.GraphObjects) { out_str(grobj.GetObjectType()); } }
EX2
void GraphObjectBase_GetObjectType_ex2() { //before run, there should exit a layoutPage called "Layout1" Layout lay("Layout1"); if(lay) { foreach(GraphObject go in lay.GraphObjects) { int nTypeID; out_str( go.GetObjectType(&nTypeID, TRUE) ) } } }
origin.h