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
 LabTalk Forum
 Problems with "Statistics on Rows/Columns"

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
doxera Posted - 12/10/2012 : 10:09:49 AM
Origin Ver.8.5.0 and Service Release 1 b161 (Select Help-->About Origin):
Operating System:Windows7HB

Hi!
I have a project like this:

and a script file containing:

[Main]
	string dn$="Drug";
	getn ( ) dn$ [Enter the drug name!];
	run.section(,by_drug);
[by_drug]
	StringArray WBookNames;
	doc -ef W {
		WBookNames.Add(%(page.label$));
	};
	WBookNames.sort();
	int WBookMax = WBookNames.getSize();
	run.section(,CreateNewDirs);
	//run.section(,ProcessingFiles);
////------------------------------------------------------------------------------
[CreateNewDirs]
	pe_cd /;
	pe_mkdir "02_Ampl_ByDrug";
	pe_cd "02_Ampl_ByDrug";
////------------------------------------------------------------------------------
	newbook name:="Ampl_all_NaHS"  sheet:=0;
	newsheet name:="Raw" cols:=$(WBookMax)+1;
////------------------------------------------------------------------------------
	newbook name:= "Ampl_all_%(dn$)" sheet:=0;
	newsheet name:="Raw" cols:=$(WBookMax)+1;
////------------------------------------------------------------------------------
	pe_cd /;
	pe_mkdir "03_Min_ByDrug";
	pe_cd "03_Min_ByDrug";
////------------------------------------------------------------------------------
	newbook name:="Min_all_NaHS" sheet:=0;
	newsheet name:="Raw" cols:=$(WBookMax)+1;
////------------------------------------------------------------------------------
	newbook name:="Min_all_%(dn$)" sheet:=0;
	newsheet name:="Raw" cols:=$(WBookMax)+1;
////------------------------------------------------------------------------------
	pe_cd /;
	pe_mkdir "04_Freq_ByDrug";
	pe_cd "04_Freq_ByDrug";
////------------------------------------------------------------------------------
	newbook name:="Freq_all_NaHS" sheet:=0;
	newsheet name:="Raw" cols:=$(WBookMax)+1;
////------------------------------------------------------------------------------
	newbook name:="Freq_all_%(dn$)" sheet:=0;
	newsheet name:="Raw" cols:=$(WBookMax)+1;
	pe_cd /;
	pe_cd "01_Pair";
	run.section(,ProcessingFiles);
////-------------------------------------------------------------------------------
[ProcessingFiles]
////
	int colnum;
	doc -ef W {
		string WBookName$ = page.label$;
		loop (ii,1,$(WBookMax)){
			string bname$ = WBookNames.GetAt(ii)$;
			if (WBookName$ == bname$){
				colnum = $(ii)+1;
				break;
			};
		};
		page.active$ = "raw";
		int ncols = wks.ncols;
		loop (ii, 2, ncols){
			string ColLongName$ = wcol(ii)[L]$;
			string ColComment$ = wcol(ii)[c]$;
			string Dirname$ = ColLongName.between("","InTime")$;
			string BookName$ = ColComment.left(4)$;
			if (BookName$ != "NaHS"){
				BookName$ = "%(dn$)";
			};
			string outbookname$ = "%(Dirname$)_all_%(BookName$)";
			wcol(ii)[c]$ = WBookName$;
			colcopy irng:=["%(WBookName$)"]Raw!col($(ii)) orng:=["%(outbookname$)"]Raw!col($(colnum)) para:=1 data:=1 lname:=1 units:=1 comments:=1 format:=1;
			wcol(ii)[c]$ = ColComment$;
		};
	};

After execution of this script I have:

Everything is OK, but I can't do any statistics on rows or columns in this new tables. It can be done if I rename the workbook by "hand" (renaming by pe_rename or page.label$ setup doesn't work). This is a bug or defect of my system or smth.else? Please help me to fix this problem! Thanks!

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