Hello everybody!
AddLabel is a very useful function to add label text to a graph. I use it very often. But there are at least two limitations at the ".Format" command. I recommend a piecewise merging like that:
void AddLabel(GraphLayer gl, string sText, double dX, double dY)
{
//GraphLayer gl = Project.ActiveLayer();
string sCmd;
//sCmd.Format("label -a %f %f %s",dX,dY,sText);
// .Format shorten the dX and dY in the string to six decimal digits
// .Format cannot handle equal sign "=" in string -> cause error at execution (without error message)
// Better use adding piecewise:
sCmd = "label -a " + dX + " " + dY + " " + sText;
gl.LT_execute(sCmd);
} // End of AddLabel
Thank you again for the nice funtion, Mike. :-)
-------------------
:-Dipl.-Phys. Dominik Paulkowski
Fraunhofer Institute for Surface Engineering and Thin Films (IST)
Braunschweig
Germany