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
 reset display range problems
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cosy

Germany
Posts

Posted - 06/12/2006 :  08:49:07 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): Origin pro 7
Operating System:XP
Hi,
I used the "set %c -e -1" to reset the display range. But this isnt working anymore. I share a part of the code here:
jj=1;
for(ii=pod1;ii<(pod2-NP-1);ii++)
{
set %Z -b ii; //set begin display range for LR
set %Z -e ii+NP-1; //set end display range for LR
lr -n %Z;
%J_A[jj]=ii;
%J_B[jj]=lr.a;
ii=ii+NP-1;
jj++;
}
win -a %K; // activate graph
//set %Z -b 1; // *refer note below
set %Z -e -1; // reset to plot entire data -> this doesnt work??
win -a %J;
type "Fitting Over";
*- I tried set %Z -b 1 it works but does not reset the display range.

Also, part of my data is missing in the worksheet after this routine.
Regards,
COSY


Edited by - cosy on 06/12/2006 10:11:23 AM

Edited by - cosy on 06/12/2006 10:12:15 AM

larry_lan

China
Posts

Posted - 06/14/2006 :  02:20:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi cosy:

Try "set %c -e wks.nRows" to reset the range. That will be OK I think.

Larry
OriginLab GZ Office
Go to Top of Page

cosy

Germany
Posts

Posted - 06/14/2006 :  05:49:15 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
Thanks for the solution. But, Now I see a strange problem. The data are displayed in the graph, but the dataset in the worksheet is empty except for the last range in the for loop. How do I see the invisible data in the dataset?
Regards,
COSY
Go to Top of Page

greg

USA
1380 Posts

Posted - 06/15/2006 :  09:53:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Probably just needs a refresh, but if not you can set display using
set %H -b 1;
Here we set the worksheet, but it could be dataset as well


Go to Top of Page

Laurie

USA
404 Posts

Posted - 06/15/2006 :  11:57:07 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Cosy,

The LR LabTalk command takes a range as an argument. So you might want to try the following instead:

lr -n %Z -b ii -e ii+NP-1;

In this case there is no need to set the display range with the set command; therefore, you won't run into a problem of needing to reset the range.

Laurie

OriginLab Technical Support
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