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
 plot "unknown" numbers of wks to existing graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

OndrejMM

Australia
81 Posts

Posted - 10/20/2008 :  08:33:59 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi Guys,

Can you please help me with the following problem,... I’m importing “unknown” number of ASCII files with names book1, book2, book3 .... bookX (the number of books varies and I cannot predict how many of them I imported),... they all have only two columns A(X), B(Y),... and I have in the project one Graph and what I need to do is to plot all those "books" (book1, book2,...) two this graph window,... I was trying the following but doesn’t work:

doc -e W // loop over all worksheets
{
if( "%[%H,5]"=="book" ) // if worksheet name starts with Data
{
Graph!page.active=1;
Layer.include(%H_B, 200);
};
};

Thanks
Ondrej

Laurie

USA
404 Posts

Posted - 10/20/2008 :  09:47:32 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
range layer1 = [Graph1]1!; // use range notation to define a layer range
// loop over all worksheets
doc -e W
{
if( "%[%H,5]"=="book" ) // if worksheet name starts with Book
{
layer1.include(%H_B, 200);
}
}

Try the above code. Using range notation, it doesn't matter if the graph is active or not.

OriginLab Technical Support
Go to Top of Page

OndrejMM

Australia
81 Posts

Posted - 10/20/2008 :  6:44:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Laurie,
cool! it works,... thanks, Ondrej
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