Best would be if we add a new method to string class to handle lines. For now, the following code will show how you can do this.
void tt()
{
GraphLayer gl = Project.ActiveLayer();
if(NULL==gl)
return;
GraphObject gr;
gr = gl.GraphObjects("Text");
if(NULL==gr)
return;
string str = gr.Text;
// assume text does not have '|' so
// can be used as separator
str.Replace("\r\n","|");
StringArray sa;
int nCount;
if((nCount = str.GetTokens(sa, '|')) > 0)
{
for(int ii = 0; ii < nCount; ii++)
out_str(sa[ii]);
}
return;
}
Edited by - cpyang on 07/05/2002 13:08:37