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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 how to get the name of active column?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

autopilot

26 Posts

Posted - 02/12/2009 :  06:16:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): Origin 7.5
Operating System:winxp

Hello,

I have a simple question. I use function curve.data$ and it needs "Name of the Y column in the worksheet". Instead of specifying Data1_B I would like to use some labtalk command for active column. What is it?


my code is the following:
//////////////////////////////////
for(jj=0; jj<=wks.nCols-1 ; jj=jj+3)
{
wks.col=jj+3; // set column number for smoothing function
wks.insert(AASm); // insert empty column with name "AASm"
%A = wks.col$(jj+2).name$; //get the name of data column
%B = wks.col$(jj+3).name$; //get the name of empty column
curve.data$=wcol(jj+2); //input Y
curve.result$=wcol(jj+3); //output Y

curve.i1=1; //index of 1st data
curve.smoothpts=55; //points for smoothing
curve.adjave(); //Adjacent Averaging

};
//////////////////////////////////

curve.data$=wcol(jj+2) does not work!
curve.data$=col(%A) also does not work!

It only works when: curve.data$=Data1_%A


Appreciate your help,
Thanks.

autopilot

26 Posts

Posted - 02/12/2009 :  08:23:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

I have figured out his way now, it works, I would appreciate your comments on the implementation whether it is well supprted by all origin versions (6, 7.5, 8) :)

for(jj=2; jj<=wks.nCols ; jj=jj+3)
{
wks.col=jj+1;
wks.insert(AASm);
curve.data$=%(%h,jj); //input Y
curve.result$=%(%h,jj+1); //output Y
curve.i1=1; //index of 1st data
curve.smoothpts=15; //points for smoothing
curve.adjave(); //Adjacent Averaging


};

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000