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
 Merging graphs and wks
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kemeyer

39 Posts

Posted - 08/03/2009 :  1:54:56 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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, like the layer -i command does. 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

greg

USA
1379 Posts

Posted - 09/14/2009 :  11:22:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Note that 'Maximized' is a Global state and not a property of an individual window. I think what you want is to refer only to non-minimized windows. You can start with a loop that covers non-minimized windows:

doc -e O {
ty Window %H is not minimized;
}

You can restrict the loop to the current Folder/View and within the loop test for graph windows and create nested loops for Layers and Dataplots:
// Loop over all non-minimized windows
doc -ef O
{
// Check if it's a graph window
if(exist(%H)==3)
{
// Loop over all layers in the graph window
for(layn = 1 ; layn <= page.nlayers ; layn++)
{
page.active = layn;
// Loop over dataplots in the active layer
doc -e DY
{
ty Dataplot %C is in layer $(page.active) of %H;
}
}
}
else ty %H is not a Graph window;
}

You can use the wmergexy X-Function to merge XY data columns. The function can be opened by
wmergexy -d;
and you can get scripting help with
wmergexy -h;
You will need to be at the SR5 or SR6 Service Release level to have this function.

Note that many Origin analyses can handle different X ranges automatically so this function may not be needed.
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