| Author |
Topic  |
|
|
hajo
Germany
Posts |
Posted - 08/31/2004 : 3:59:45 PM
|
Origin Version (Select Help-->About Origin): 7.5SR4 Operating System: WinXP
Hello, all
is there a programming interface available (OriginC) for the menu command: "Analysis->Extract Worksheet Data ..." ??
Or any OC function doing the same job?!
Thanks HAjo |
|
|
hajo
Germany
Posts |
Posted - 09/01/2004 : 2:45:44 PM
|
Hello, All
seams, that nobody knows something about that - it also seams, that there's no programming interface available, scanning the docs and the forums ...
So I want to ask, if someone can explain me, how the function in general works, maybe its easy to write some separate OC code to do the job ...
Thanks Hajo
|
 |
|
|
easwar
USA
1965 Posts |
Posted - 09/01/2004 : 3:03:38 PM
|
Hi Hajo,
Our apologies for not responding to this earlier. Currently this menu item runs internal code, and there is no LabTalk or OC access to this feature. The dialog can be brought up programmatically from LabTalk using the domenu 36496 command, but user will then have to fill the condition box in the dialog etc.
We are planning on adding programmatic access in a future version.
That said, one can always write OC code to perform some custom filtering create a new worksheet perhaps?
Easwar OriginLab
|
 |
|
|
hajo
Germany
Posts |
Posted - 09/01/2004 : 3:19:03 PM
|
Hello, easwar
thanks for the answer ... I know the menu command, but I want programmatically have access to the dialog options as there's no sense in opening and filling in the dialog each time a new file is read in within an analysis cycle of about 100 files ...
can you give any hint, how the internal code Origin is using works?
Is the clipboard used? Do you copy the entire worksheet and delete the rows that are not needed? my favourit would be to sellect a range of data out of a worksheet by a member function like: wks.getRange(wksTarget, instert_startColumn, insert_startRow, RangeStartRow, RangeEndRow=-1, RangeStartCol=0, RangeEndCol=-1); (RangeEndCol=-1 for all Columns not emty in worksheet) or can I do something like that by an other OC function ...
....
Thanks Hajo
Edited by - hajo on 09/01/2004 3:24:01 PM
Edited by - hajo on 09/01/2004 3:45:29 PM |
 |
|
|
cpyang
USA
1406 Posts |
Posted - 09/01/2004 : 4:22:45 PM
|
Right now, you will need to write your own function. Internally, we first save the worksheet into a template and then load that as destination worksheet. Then starting with this empty worksheet that is identical to the original except the data, we loop each row and call the LT expression to see if TRUE and copy that row.
Your suggestion for a new member function is very good, we will add something like that in Origin 8, maybe
int Worksheet::Extract(Worksheet& wksDest, int nR1, int nC1, int nR2, int nC2, WksFilterBase* pFilter);
If pFilter is NULL, then all the data in the given range will be copied, otherwise this class will have member functions like virtual BOOL OnBeforeExtract(Worksheet& wksSrc, Worksheet& wksDest, int nR1, int nC1, int nR2, int nC2); //return TRUE if accept row virtual BOOL OnExtract(Worksheet& wksSrc, int nRow);
virtual void OnAfterExtract();
CP
|
 |
|
|
hajo
Germany
Posts |
Posted - 09/02/2004 : 03:26:21 AM
|
hello, cp
thanks for reply ... I'll have a look to that at the weekend ...
So far Hajo
-- Dipl.-Ing. Hans-Joerg Koch SiemensVDO Automotive, Regensburg, Germany
|
 |
|
| |
Topic  |
|
|
|