T O P I C R E V I E W |
gloorigin |
Posted - 03/13/2003 : 03:05:52 AM I would need some help about Origin. I have done a script and a BAT file to open and plot clicking a xy data file (called *.ttt). The problem is that I have to do 300 plots and I cannot run all the files *.ttt at the same time because only the last file on the list is opened.It seems that Origin needs a pause....
The BAT file is:
echo opendat=1; %%A=%1>c:\Origin6\opendat.cnf start c:\Origin6\origin60.exe -a opendat.cnf -tw opendat.otw exit
and the script:
if(opendat=1); open -w %A;//import ascii file queue{ //delay execution until window is ready wks.col1.type=4; wks.col3.type=4; wks.col5.type=4;
worksheet -s 0 0 0 0; worksheet -p 202 3f.OTP;//plot selected columns layer.color=color(white); page.basecolor=color(white); year=19; %S="/%[%C,5:6]"; %P=$(year)%[%C,3:4];
%T="/%[%C,7:8]:00"; %u=%[%c,9:10]; if(%u=="HM") %u="hmF2"; if(%u=="FO") %u="foF2"; %r=%[%c,1:2]; if(%r=="SJ") %r="San Juan"; if(%r=="tu") %r="Tucuman";
label -d 3500 300 -s \v(%P %S %T LT/ %u %r); Layer.y.from=0; Layer.y.to=500; layer.y.inc=50; Layer.x.from=-200000; Layer.x.to=4000000; %P=%[%C,1:13];
export.image(%P.wmf,WMF); doc -s;
exit;
}; opendat=0;
Thanks a lot for your help. G. |
4 L A T E S T R E P L I E S (Newest First) |
gloorigin |
Posted - 03/14/2003 : 05:17:19 AM HI MIKE! THANKS A LOT FOR YOUR HELP. I AM GOING TO TRY IT. THANKS. REGARDS, GLORIA |
Mike Buess |
Posted - 03/13/2003 : 10:40:18 PM Hi Gloria,
I just added a section called "Associating file extensions with Origin" to my LabTalk and OriginC Resources page at labtalk.nmrtools.com. It should contain all the information you need, but if you have any questions you can post them here or email them to me directly.
...I should add that importing 300 files at one time by any method is probably not a good idea. You may end up with a corrupt project file.
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 03/13/2003 10:52:27 PM |
gloorigin |
Posted - 03/13/2003 : 10:07:03 AM quote:
Hi Mike,
I don't know how you manage to run the BAT by selecting *.ttt files, but when you open 300 files this way does BAT run 300 times or just once? > If each file name were sent to BAT separately you'd end up with 300 instances of Origin running. Probably not a good idea and you'd notice it. THE WAY I USED TO MANAGE THEM WAS USING WINDOWS EXPLORER/VIEW OPTIONS/FILE TYPES. I SELECTED THE *.TTT TO OPEN THEM WITH MY BAT FILE. SO, I HAVE 300 ORIGIN WINDOWS OPENED AT THE END!!!!. THIS IS THE PROBLEM.
> The (more likely) alternative is that the file names are sent to BAT as 300 separate arguments and BAT uses only the first (%1). Subsequent arguments (%2, %3, ...) are ignored so only one file is imported. HOW COULD I DO THAT?? If you are comfortable with editing the Windows Registry (the usual cautions apply) you can set up a proper association for the TTT extension that will do what you want without using a BAT file. I don't have time to explain now, but if you're interested I can do so in a later reply. I WOULD BE VERY GRATEFUL IF YOU COULD ME EXPLAIN IT. THANKS A LOT, REGARDS, GLORIA
Origin WebRing Member
|
Mike Buess |
Posted - 03/13/2003 : 09:12:27 AM Hi G,
I don't know how you manage to run the BAT by selecting *.ttt files, but when you open 300 files this way does BAT run 300 times or just once?
> If each file name were sent to BAT separately you'd end up with 300 instances of Origin running. Probably not a good idea and you'd notice it.
> The (more likely) alternative is that the file names are sent to BAT as 300 separate arguments and BAT uses only the first (%1). Subsequent arguments (%2, %3, ...) are ignored so only one file is imported.
If you are comfortable with editing the Windows Registry (the usual cautions apply) you can set up a proper association for the TTT extension that will do what you want without using a BAT file. I don't have time to explain now, but if you're interested I can do so in a later reply.
Mike Buess Origin WebRing Member |
|
|