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
 Script on marked windows in Project Explorer
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cougar2

Germany
Posts

Posted - 04/28/2004 :  06:32:32 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Dear all,

is there a way to execute a Labtalk script on the windows that the user marks in the Project Explorer (using the mouse, one window or several by using Shift)?
My idea is to get the window names of some graphs (target %a), rename them in order to plot them in a Layout-Template window that was inserted before and then rename back to restore the old window names. Doing this manually with %a and %b it would look like this:

win -t Layout Layout_8graphs.otp Layout_01; // insert Layout template
%a=Graph_11472_4;
%b=Graph02; // Layout template has placeholder for Graph0X
win -r %a %b;
win -r %b %a; // rename back
doc -uw;

Is there a way?
Best regards,
Cougar

Mike Buess

USA
3037 Posts

Posted - 04/29/2004 :  12:07:22 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Cougar,

There is no way to manually select multiple windows like you suggest. You can create a multiple window selection dialog in LabTalk as described in the "Creating multiple selection dialogs" topic at http://labtalk.nmrtools.com.

Another method available in Origin 7.0 or later (and possibly 6.1) is to create a project folder and move the graphs you want on the layout to that folder. Then select View->View Windows->Active Folder, select the new folder in Project Explorer and run a script based on this...

nn=0;
win -t Layout Layout_8graphs.otp Layout_01;
doc -ef P {
// loop through all plot windows in folder
%A=%H; // plot window name
nn++;
%B=Graph$(nn); // placeholder name
win -r %A %B;
win -r %B %A;
doc -uw;
};

I'm not convinced the layout will turn out like you expect but it might be worth trying.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 04/29/2004 12:35:37 PM
Go to Top of Page

cougar2

Germany
Posts

Posted - 05/03/2004 :  07:53:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

that works really great, the script on the homepage is kind of neat. And it also does the thing with the template that I wanted so thank you very much indeed.

Regards,

Cougar

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