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
 Forum for Origin C
 Get dataset from plot

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
jfatherton Posted - 07/15/2003 : 2:56:05 PM
Hi,

Please forgive the stupid question but I am fairly new at OriginC.

I am working on an OriginC function that I want to perform a number of manipulations on a graph that has previously been plotted. Everything was going fine but then I wanted to get data from the datasets that were used to plot the graph. I am probably missing something very simple but, searching through the help files I can find no way to find out which columns of data from which worksheet were used to plot a particular graph. Is this possible?

thanks,

Jeremy
2   L A T E S T    R E P L I E S    (Newest First)
jfatherton Posted - 07/15/2003 : 5:33:25 PM
Thanks,

GetDatasetName() was exactly what I was looking for.

Jeremy
easwar Posted - 07/15/2003 : 3:54:25 PM
Hi Jeremy,

Try the code pasted below - it gets the name of all data plots in the layer. Once you get a data plot name, such as data1_b, you can parse it further to find out which worksheet, which colum etc. If you need further help, please post.

Easwar
OriginLab.


void test()
{
// Delcare graph layer and point to active layer in project
GraphLayer gly = Project.ActiveLayer();
// If valid graph layer, then...
if(gly)
{
printf("List of plots in layer:\n");
// Loop over collection of data plots in
foreach(DataPlot dp in gly.DataPlots)
{
string strName = dp.GetDatasetName();
printf("%s\n", strName);
}
}
// If not valid graph layer, print error
else
printf("Active layer is not a graph layer!\n");
}



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