Hi Shemini,
To get the Long Name, you can use the Column::GetLongName method. So, we should first get the column from the data plot in the graph layer. Here we need to use the following methods: DataPlot::GetDataRange, XYRange::GetXColumn and XYRange::GetYColumn.
The example below will be helpful.
void testGetLongName()
{
GraphLayer gl = Project.ActiveLayer(); // get the active graph layer
if(gl)
{
foreach(DataPlot dp in gl.DataPlots) // loop all data plots in the active graph layer
{
XYRange xy; // xy range of the data plot
Column xCol, yCol; // xy columns of the data plot
// get xy range and xy columns of the data plot
if(dp.GetDataRange(xy) && xy.GetXColumn(xCol) && xy.GetYColumn(yCol))
{
string strXLongName, strYLongName;
strXLongName = xCol.GetLongName(); // get long name of x column
strYLongName = yCol.GetLongName(); // get long name of y column
out_str("Long Name of Column X:"+strXLongName);
out_str("Long Name of Column Y:"+strYLongName);
}
}
}
}
Penn