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
 Origin Forum
 Template <-> File Extension

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
buddyharle Posted - 11/08/2002 : 02:43:07 AM
Hello,

I would like to connect a certain file extension to a specific worksheet template. The problem is, that I have to import multiple ascii-files with different types a data. So what I have to do every time is to open the template, save it as origin.otw, import, open the next template, save it as origin ...

What I suggest is a connection with the use of file extension, say I have files called xyz.d1, cdf.d2, fge.d3. When I import .d1-files Origin should use template d1.otw and so on.

Any good ideas?

CU
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 11/08/2002 : 09:04:31 AM
Hi CU,

You can specify which template to use in the Import Multiple ASCII dialog. Check the "Import each file into a new worksheet" and a Template column will show up next to the File Name column. You can choose a different template for each data file if you want.

It's also straightforward to do what you want with LabTalk or Origin C scripts. Use fdlog.multiopen() to open the file selection dialog and fdlog.get(A,n) to assign the nth file to the string variable %A. Then you can use %[%A,>'.'] to find its extension and choose the template accordingly. Something like this...
fdlog.multiopen(); // count=number of files chosen 
loop (ii,1,count)
{
fdlog.get(A,ii); %T=Origin;
if("%[%A,>'.']"=="d1") %T=d1;
if("%[%A,>'.']"=="d2") %T=d2;
if("%[%A,>'.']"=="d3") %T=d3;
win -t D %T; // open template
open -w %A; // import file to template
};


That help?

Mike Buess
Origin WebRing Member

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