T O P I C R E V I E W |
marasneo |
Posted - 04/23/2015 : 12:59:22 PM Hello, in one topic I found such function that flips all selected columns. It works, but only when I select a few columns in one tab in worksheet. Is it possible to modify this script for selection of a few columns in a number of tabs in the same worksheet? This is essential for me, also for further scripts. Maybe the problem is here: Project.ActiveLayer();
void flip_selected_columns() { Worksheet wks = Project.ActiveLayer(); vector<int> vv; wks.GetSelectedColumns(vv); int nSels = vv.GetSize(); if( !nSels ) return; for(int ii; ii<nSels; ii++) { Dataset dd(wks,vv[ii]); matrix mm(dd.GetSize(),1); mm.SetByVector(dd); mm.FlipVertical(); mm.GetAsVector(dd); } } |
1 L A T E S T R E P L I E S (Newest First) |
lkb0221 |
Posted - 04/24/2015 : 12:07:07 PM Hi,
What do you mean by "a number of tabs in the same worksheet"? For one worksheet is just one single tab. To loop through all layers in one page, please see the following doc: http://www.originlab.com/doc/OriginC/ref/Page-Layers
Zheng OriginLab |
|
|