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
 Delete row

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
kpongani Posted - 03/26/2012 : 10:18:27 PM
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.
2   L A T E S T    R E P L I E S    (Newest First)
kpongani Posted - 03/27/2012 : 12:57:03 PM
That's it! Many thanks!
Hideo Fujii Posted - 03/27/2012 : 11:06:13 AM
Hi kpongani,

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

--Hideo Fujii
OriginLab

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