Hi SimpleSimonSays and abhishekkhare,
Does the following snippet help you to understand how getpts can be used?/////////////////
//Run the getpts command when the graph window is opened
getpts 3;
//Run the following after executing getpts command
type -a Dataset: %(getpts.data$) Index Data: %(getpts.indexdata$) X Data: %(getpts.xdata$);
//XPOS=_XPOS; INDX=_INDX; edit XPOS; edit INDX;
range xx = [??]!_INDX; //range of the index loose ds
range ro=[Book2]1!col(1); //destination dataset
ro=xx; //copy loose dataset to a permanent dataset
ds$=getpts.data$;
str1$=Token(ds$,1, '_')$;
str2$=Token(ds$,1, '@')$;
str2$=Token(str2$,2, '_')$;
str3$=Token(ds$,2, '@')$;
type -a Book: %(str1$) Sheet: %(str3$) Column: %(str2$);
//The out put would be like:
Dataset: Book1_B@2 Index Data: _indx X Data: _xpos
Book: Book1 Sheet: 2 Column: B
/////////////////
Note that the 3rd token in getpts.data$ indicates the sheet sequence in the order of the creation.
Also, the following document about getpts has typos of missing '$'s of getpts.xdata$ and getpts.indexdata$ .
http://www.originlab.com/doc/LabTalk/ref/GetPts-cmd#no_option.3B_Get_npts_by_Data_Reader_tool
Hope this helps.
--Hideo Fujii
OriginLab
P.S. You can use the x-function pickpts, which returns the plot name in the range notation. Therefore, we recommend to use pickpts instead of getpts command. See:
http://www.originlab.com/doc/X-Function/ref/pickpts