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
 selecting and merging two graphs

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
slooff Posted - 03/23/2010 : 4:41:01 PM
Origin Ver. 8 and Service Release 6
Operating System:Windows

I have multiple graphs in a project. How can I select two graphs and merge them into one? Both graphs have two layers and the new graph should again have two layers with 2 dataplots in each layer.

Thanks for the help!

Lenneke
8   L A T E S T    R E P L I E S    (Newest First)
Penn Posted - 05/23/2010 : 9:35:42 PM
Hi,

The prototype of this function is:

bool open_page_preview_list_dlg(HWND hWndParent, string& strPages, LPCSTR lpcszStartPEpath = NULL, DWORD dwCtrl = SELECT_MULTIPLE_PAGES | SHOW_FOLDERS | ENABLE_EMBEDED, int nPageType = EXIST_GRAPH, LPCSTR lpcszFilterFuncName = NULL);

When there are graphs selected and the OK button is clicked, it will return true. Otherwise, the Cancel button is clicked and it will return false.

Penn
Belsinga Posted - 05/21/2010 : 09:07:59 AM
What does this

"open_page_preview_list_dlg"

return when you select a graph inside?
slooff Posted - 04/02/2010 : 04:47:09 AM
Yes, that works!
Thank you!
Penn Posted - 04/02/2010 : 03:45:40 AM
Hi Lenneke,

Do you mean something like the Graph Browser in the merging graph tool? If so, you can use the following code to bring up this browser for use.

void select_graphs()
{
	string 	strGraphs;
	open_page_preview_list_dlg(GetWindow(), strGraphs);  // bring up the Graph Browser dialog
	printf("The selected graphs:\n%s\n", strGraphs);  // names of the selected graphs
	
	// separate each graph
	vector<string> vsGraphs;
    int nRet = strGraphs.GetTokens( vsGraphs, STR_PAGE_LIST_SEPARATOR);
    if(nRet > 0)
    {
 		for(int iGraph = 0; iGraph<vsGraphs.GetSize(); iGraph++)   	
    		printf("The graph %d is: %s\n", iGraph+1, vsGraphs[iGraph]);
    }
}


Penn
OriginLab Technical Services
slooff Posted - 04/02/2010 : 02:16:38 AM
No sorry, I need some specific features when I merge the graphs which seem not to be in this merge option.
So I am looking for such a selection dialog that can be opened when I run my script.

Regards,

Lenneke
Penn Posted - 04/01/2010 : 10:43:24 PM
Hi,

Origin has provided a tool for merging graphs by selecting manually. Maybe you can have a try first. Please refer to this page.

I hope this is what you want.

Penn
OriginLab Technical Services
slooff Posted - 04/01/2010 : 3:40:56 PM
I can plot the graph now, but is there a way to have in the script a dialog box that opens or something like that, so that I can select two graphs in the project (there are many more).
After selcting them I want to use them in the remainder of the script.
Penn Posted - 03/23/2010 : 9:21:36 PM
Hi Lenneke,

This example can help.

Penn
OriginLab Technical Services

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