Author |
Topic  |
|
vlada.jerkovic
Germany
8 Posts |
Posted - 12/09/2008 : 4:56:58 PM
|
Origin Ver.8 and SR3 (Select Help-->About Origin): Operating System:win XP
Is it possible to open some dialog box to select several workbooks from within origins project explorer in order to perform specific operation on them (like averaging, subtractions, etc. )? Please some example in C. |
|
Iris_Bai
China
Posts |
Posted - 12/10/2008 : 02:40:37 AM
|
Hi,
You can use XF builder to create a X-Function dialog with specified worksheet number. The dialog just like the picture below:

About how to create this dialog, you can: 1. Choose menu Tools -> X-Funcitons Builder, in opening dialog, type "averaging" as xf name in X-Function editbox. 2. In Variables table, right click and choose Add variable, then do the following changes: Name DataType wks1 Worksheet wks2 Worksheet 3. Choose menu File -> Save, in opening Save dialog, click Save button. 4. Click Edit X-Funciton in Code Builder button, in Code Builder averaging function, copy the statement below in funciton body: printf("wks1 is %s, wks2 is %s\n", wks1.GetName(), wks2.GetName()); and click Compile button , and click Return to Dialog button back to X-Function builder 5.In X-Function builder, click Save button to save code change, close X-Function builder. 6. In Command window, run "averaging -d", a dialog show, you can click active button to choose worksheet.
But, do you want to select data from several workbook, not workbook? If so, can set DataType to vector, Range or XYRange and so on. More information about how to create new X-Funciton, like refer to http://www.originlab.com/www/helponline/Origin8/en/Programming/mergedProjects/XFProgramming/XFProgramming/Create_New_X-Function.html
Iris |
 |
|
vlada.jerkovic
Germany
8 Posts |
Posted - 12/15/2008 : 2:45:46 PM
|
Thanks for your answer. I did a similar X-Function for matrix selection. However, I would like to ask is it possible to make such a function where user could choose the number of matrix windows he/she would like to select from the project, where this number would vary depending on the task. This would be equivalent to selecting a number of matrices/worksheets in wks1 input variable from the example you provided, and one matrix/worksheet as wks2 in order to perform a specific operation between each matrix from the wks1 group and the one selected in wks2.
The problem is that the number of matrices/worksheets in the wks1 group is not constant, so the number of input variables for this X-function would vary.
Thanks in advance. |
 |
|
|
Topic  |
|
|
|