The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 getpts: data connected to selected point

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
SimpleSimonSays Posted - 01/15/2013 : 6:59:38 PM
Origin Ver. and Service Release (Select Help-->About Origin): 8.5.1 SR 2
Operating System: Windows 7 64

Hello everybody! I got some problems with getpts. I have a plot of multiple datasets from different worksheets. I'm trying to build a script that allows my to select some data points from this graph and write them with other data from the selected row to a new worksheet. I didn't manage to get a range on the selected data. I need to know which line in the graph (meaning data from which worksheet) was selected and which row was it.
There ist getpts.data$ but it does not contain, what i was expecting.
Can someone help?
2   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 01/29/2016 : 2:46:59 PM
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
abhishekkhare Posted - 01/28/2016 : 06:57:57 AM
I am also looking for the same information, did you figure out something?

Abhi

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000