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
 Merging Graphs and Worksheets

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
kemeyer Posted - 08/03/2009 : 1:57:05 PM
Origin Ver. 7 and Service Release (Select Help-->About Origin):
Operating System:XP

I want to merge graphs in my program, but not in the same way the merge graph button does. I wanted to put them all on one layer. However, I came the the problem of how do I let the use select which graphs to merge?

I wanted to just merge the maximized graphs, but I don't know how you can tell whether a graph is maximized or not. Is it possible to get graph/active dataset names from maximized windows? If not, what is another way to let the user choose which graphs to merge so that I can store the names? (Aside from them typing in a name-the names generated are sometimes long and tedius to type).

Also, I was wanting to merge some columns from worksheets together. Data is taken and generated upon different ranges, some of which even overlap. I want to be able to throw them all into a worksheet so that the whole entire range is covered. Is there a good way to do this other than compare values of cells and paste selections? (There might be some positions that are duplicated with different collected data)

Thanks,
Katie
2   L A T E S T    R E P L I E S    (Newest First)
Iris_Bai Posted - 08/03/2009 : 10:59:52 PM
About meger columns in worksheet please reference the sample in this wiki page: http://ocwiki.originlab.com/index.php?title=OriginC:Accessing_Worksheet_Format_with_Theme_Tree#Set_Merge_for_Units.2FComments.2FLong_Name.
This way only works when the content in cells is same.
And This example also need Origin8.

Iris
Iris_Bai Posted - 08/03/2009 : 10:55:56 PM
Hi Katie,

There is an example codes to find maxized graphs and add plots from selected graphs to a newly created graph on one layer. But this example need Origin8.


void testGraphs()
{
	// find maximized graphs
	vector<string> vsGraphs;
	foreach(GraphPage gp in Project.GraphPages)
	{
		if( PAGE_MAXIMIZED == gp.GetShow() )
			vsGraphs.Add( gp.GetName() );
	}
	
	GraphPage gpNew;
	gpNew.Create("Origin");
	GraphLayer glNew = gpNew.Layers();
	
	// add plots from selected graph to one new graph in one layer
	for(int nn = 0; nn < vsGraphs.GetSize(); nn++)
	{
		Page pg(vsGraphs[nn]);
		foreach(Layer lay in pg.Layers)
		{
			GraphLayer gl(lay);
			Tree tr;
			bool bWasGroup = gl.UngroupPlots();
			gl.GetLayerContents(tr, GETLC_DATAPLOTS | GETLC_NO_LIMITS);
			
			int nPlots = glNew.AddPlots(tr.FirstNode, ADDPLOTSFROMTREE_NEW | ADDPLOTSFROMTREE_IMPLICIT_STYLEHOLDERS); // returns total number of data plots in the layer 
		}
	}	
}


Iris

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