Hey fellow Labtalk Fans,
I tried to get data from a plot using the datareader tool. I have a series if linegraphs plotted in a group.
For that I defined the PointProc macro.
Getting the x and y data is no problem. I don't know if my solution is the propper way, but it works.
Getting the name of the dataset proves to be the bigger problem.
I tried using the getpts.data$ methode, but failed. First I think I call it wrong, since it always gets the name of the first curve in the plot I selected and not from the other ones. Also this methode only gives me a reference without the used WorkSheet, like:
Book3_A
If possible, I would like to access the Longname and an User defined parameter of the plotted data.
Is there an example of this in the Labtalk documentation, or does somebody know a solution to this?
Below is my code:
getpts;
// read x and y from a plot upon pressing enter
// and append it to Book1 in Sheet1
def PointProc{
range DataSetIdentifier = [Book1]Sheet1!Col(1);
range xValues = [Book1]Sheet1!Col(2);
range yValues = [Book1]Sheet1!Col(3);
index = xValues.GetSize() + 1;
DataSetIdentifier[index]$ = getpts.data$;
xValues[index] = $(x,);
yValues[index] = $(y,);
}