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 for Programming
 LabTalk Forum
 Delete row
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

kpongani

USA
17 Posts

Posted - 03/26/2012 :  10:18:27 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 8.0 and Service Release 6 (Select Help-->About Origin):
Operating System: Win 7

I want to delete every 3rd row of a worksheet. I found an example of how to do this is the LabTalk Scripting Guide.

However, when I try to run the code, all I get is a not very helpful
#Command Error! message.

Any idea what is wrong?

Here is the code I'm trying to run:


int ndel = 3;
range rr = col(1);
nrows = rr.GetSize();
int nlast = nrows - mod(nrows,ndel);
for(int ii = nlast; ii > 0; ii -=ndel)
{
 range rr == wcol(1)[$(ii):$(ii)];
 mark -d rr;
}


Many thanks.

Hideo Fujii

USA
1582 Posts

Posted - 03/27/2012 :  11:06:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi kpongani,

 range rr == wcol(1)[$(ii):$(ii)];
should be:
 range rr = wcol(1)[$(ii):$(ii)];

--Hideo Fujii
OriginLab
Go to Top of Page

kpongani

USA
17 Posts

Posted - 03/27/2012 :  12:57:03 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
That's it! Many thanks!
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