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
 usage: worksheet -s

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
HannesK Posted - 07/05/2007 : 04:29:59 AM
Origin Version (Select Help-->About Origin): 7
Operating System: Win XP


Ladies and Gentlemen,

I'd like to create some graphics inside of a "for"-environment. The data of interest has to be selected via "worksheet -s ...", I guess. Then, one can plot like "worksheet -p ..." Unfortunately, i cannot get Labtalk running like

worksheet -s $(ii+1) 0 $(ii+1) 0;
worksheet -p 200 template;

whereas

worksheet -s 2 0 2 0;
worksheet -p 200 template;

works fine. Thus, the problem looks like how one has to implement the index "ii" into the "worksheet -s ..." command correctly.

Thank you very much for any help
reg
Hannes
2   L A T E S T    R E P L I E S    (Newest First)
HannesK Posted - 07/06/2007 : 08:06:41 AM
Hi Mike,
thanks a lot. All the commands you suggested work fine. In fact, one tiny semicolon set my for-loop out of duty:

for(ii=1;ii<=(cols-1);ii++); // <- no semicolon here!
{
win -a main;
wo -s; // unselect all columns
wks.colsel(ii+1);
worksheet -p 200 BasicLinLin;
};

Beginner's mistake. Sorry and thanks a lot

Hannes
Mike Buess Posted - 07/05/2007 : 08:56:16 AM
Hi Hannes,

The following script works perfectly for an XYYYY worksheet in O70 SR4.

%W=%H;
for(ii=1;ii<=4;ii++) {
win -a %W;
wo -s $(ii+1) 0 $(ii+1) 0;
wo -p 200;
}

However, the $() notation is not really necessary in this case. The following commands work just as well...

wo -s ii+1 0 ii+1 0;
wo -s (ii + 1) 0 (ii + 1) 0; // parenthesis needed because of spaces surrounding the plus symbols


Finally, you can use the wks.colsel() method to select individual columns...

wo -s; // unselect all columns
wks.colsel(ii+1); // select column ii+1

Mike Buess
Origin WebRing Member

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