Author |
Topic  |
|
cyantist
USA
8 Posts |
Posted - 02/25/2010 : 10:11:09 PM
|
Origin Ver. and Service Release (Select Help-->About Origin): 7.5 Operating System: WinXP
Is there a way I can loop the following tasks to automate copying designated columns into pre-created worksheets: (where main worksheets are WS1 up to WS15, and pre-created worksheets are G01 up to G15)
%(G01,3)=%(WS1,2); // copies data1/col2 to newdata1/col3 %(G01,4)=%(WS1,50); // copies data1/col4 to newdata2/col1 %(G01,5)=%(WS1,18); %(G01,6)=%(WS1,66); %(G01,7)=%(WS1,34); %(G01,8)=%(WS1,82);
window -a G01; // make G01 active window mark -d G01_1 -b 1 -e 4; // delete first 4 cols in G01
%(G02,3)=%(WS1,3); %(G02,4)=%(WS1,51); %(G02,5)=%(WS1,19); %(G02,6)=%(WS1,67); %(G02,7)=%(WS1,35); %(G02,8)=%(WS1,83);
window -a G01; // make G01 active window mark -d G01_1 -b 1 -e 4; // delete first 4 cols in G01
...and so on, until G15. Then repeat for WS2 (but with different column designations in G), and so on until WS15.
I'm a total noob in automating Origin and programming in general, but I'm learning as I go along. I'll try to post any solutions I find.
Thanks! |
|
Laurie
USA
404 Posts |
Posted - 02/26/2010 : 6:08:14 PM
|
You could do something like the following: index1=2; index2=50; index3=18; index4=66; index5=34; index6=82; loop(ii,1,15){ %(G0$(ii),3)=%(WS1,index1); %(G0$(ii),4)=%(WS1,index2); %(G0$(ii),5)=%(WS1,index3); %(G0$(ii),6)=%(WS1,index4); %(G0$(ii),7)=%(WS1,index5); %(G0$(ii),8)=%(WS1,index6); index1++; index2++; index3++; index4++; index5++; index6++; }
OriginLab Technical Support |
 |
|
|
Topic  |
|
|
|