srishti0610
India
3 Posts |
Posted - 07/26/2010 : 10:19:45 AM
|
I have created a code using Labtalk which creates several plots taking data from an xls file. the plotting part of the code is working perfectly but watever changes I am trying to introduce in its font and legend , nothing is happening and its alwez giving a Command Error which I am nt able to sort out what is the error..could ne1 please help me with finding the error in the code..My code is as follows..
//This program is used for single plots
getfile -m *.xls; // get multiple ASCII *.xls data files
String nfname$,pfname$,gname$; pfname$=" ";int ij=100;int clr=1;
for(i=1;i<=count;i+=1) {
getfile -g i;
pathnm = %[%A];//gets the pathname's length
fname$ = "%B";
%J=%[%A, pathnm-12:pathnm-4];//gets critical filename %J=; %K = %[%J, >'_'];//gets strings to the right of _ sign %K=; gname$="%K";//this is the graph name ij=gname.GetAt(8);//ij checks if there is a character at position 8, its used to differentiate between ch301_1 and ch301_1a
types
//the following check decides if the filename is of type ch301_1 or ch301_1a if(ij>96) %M=%[%K,9]; else %M=%[%K,8];
%L = %[%K, 6];%B=%L; %B=; string nfname$=%B;//stores new file name gname$=%M;
//the following checks if the filename already exists then it opens and appends else creates new file if(nfname.Compare(pfname$)==0) {save -i %(fname$);} else {document -s;doc -n; fname$ = "%B";} type "%(gname$)";
win -t data; // bring up a new worksheet open -w %A; // import the data
worksheet -s 0 0; string bkname$ = page.name$;//active book name string shname$ = layer.name$;//active sheet name type "bkname"; bkname$=;
loop(ii,2,10) { loop(jj,13,14) { plotxy [bkname$]shname$!($(jj),$(ii)) plot:=200 ogl:=[gname$]1!; } }
win -a "%(gname$)"; legend -s; legend.text$ = %K; legend.background = 8;
layer.x.type = 0; //Set the start value layer.x.from = 0; //Set the end value layer.x.to = 1000; //Set the increment value layer.x.inc = 2;
layer.y.type = 0; //Set the start value layer.y.from = 0; //Set the end value layer.y.to = 1000; //Set the increment value layer.y.inc = 2;
//legendupdate mode:=dr; //layer.x.label.pt=28; //layer.y.label.pt=28; //%C="%(bkname$)_B";set %C -cl clr; set %C -w 1500;
save %(fname$);type "%(fname$)"; //range aa=plotxy.ogl$; pfname$=nfname$;//stores the previous file name for comparison type "%(pfname$)"; if(clr>8) clr=1; ij=0;};
please help me as i need to complete this task by today!!!
Srishti |
|