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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 dotool 3: get dataset of a point
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

G.Bartsch

Germany
Posts

Posted - 09/18/2006 :  04:27:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
hello,
i want to use dotool 3 to get the dataset of a point selected. i thought i could adress this by %c but this doesnt work.
hope you know something about that.
thanks a lot.

Deanna

China
Posts

Posted - 09/18/2006 :  05:03:43 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
That's weird. Please make sure that you have selected a point on the graph after you run "dotool 3". If a point is selected, the Data Display tool should read the dataset name, as well as the x and y values. In this case, %c should work, which means using "%c=" in the script window will display the dataset name.

Deanna
OriginLab GZ Office
Go to Top of Page

G.Bartsch

Germany
Posts

Posted - 09/18/2006 :  06:21:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
yes, thats weird. but unfortunately it is the truth. data display shows me the dataset correctly but %c is always the first y dataset in the worksheet and not the one the point corresponds to. with dotool 4 %c is correct but i want to use dotool 3.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 09/18/2006 :  08:28:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Use the pointproc macro...

def pointproc {%C=};
dotool 3;

Mike Buess
Origin WebRing Member
Go to Top of Page

G.Bartsch

Germany
Posts

Posted - 09/18/2006 :  12:03:22 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I tried that, but when I use the code as you recommend pointproc returns always the first y column. What am I doing wrong? Any ideas?
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 09/18/2006 :  12:54:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Not sure what you are doing wrong but when I double-click it prints the name of the dataset containing the data point. Of course you need to do something different if you want to make use of that name when you close the tool...

def pointproc {%A=%C; %A=};
dotool 3; // open data reader
// select a few data points then run following scripts
dotool 0; // quit data reader
%C=; // return active dataset (usually 1st column)
%A=; // return the last selected dataset (not necessarily active)

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 09/18/2006 12:58:08 PM

Edited by - Mike Buess on 09/18/2006 1:41:20 PM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000