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
 Origin Forum
 Long filenames >14 chars
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tib

Switzerland
105 Posts

Posted - 06/04/2003 :  04:28:58 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Does anyone know how I can handle filenames. The worksheet and graph names seem to be limited to 14 and 24 characters, respectively?
How can I import files like
C034a0909iv_ex_slow.dat
C034a0909iv_ex_medium.dat
C034a0909iv_ex_fast.dat
Do I have to rename all first? But I have 1000+ more of them.
I don't want to loose information since the filename contains the substrate name (C034a), the sample on the substrate (0909) and other sample and measurement information (iv_ex_medium).
Are there any plans to allow longer filenames in Origin?
Tilman.

edgar.kaiser

Switzerland
29 Posts

Posted - 06/04/2003 :  06:20:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

you can put the filename into the Window label. I don't know if it is limited in length, but to my experience it takes fairly long texts.

If you want to do it by script, use:

windowName!page.label$ = "labelContents";

or

window -rl windowName "labelContents";

Switch on display of label with:

windowName!page.title = 1;

Another advantage is that the label will accept all symbols and spaces which the window name doesn't.

Regards,

Edgar
Go to Top of Page

tib

Switzerland
105 Posts

Posted - 06/06/2003 :  03:00:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Edgar,
thanks for your comment. But I think the problem is that Origin does not allow you to import such long filenames because it will cut off everything beyond 14 characters in a worksheet. Origin will then complain that this name already exist and you have to rename it to something shorter by hand. One could work around like you said with the label an give the worksheet a shorter code-name. But then how do you plot data? You have to create a look-up table etc. etc... You see it's getting complicated... But that's not what I'm looking for...
Thanks anyway,
Tilman.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 06/06/2003 :  07:44:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Tilman,

Origin does fine with long file names... the problem is with the worksheet name, as you already noted. If you're importing with the Import ASCII menu command you can fix it like this...

1> File->Import->ASCII Options->Other Options.
2> Uncheck "Rename Worksheet to Data File Name", click OK.
3> Click "Update Options" and "Cancel" to close ASCII Options.
4> Click the Save Template button on the Standard toolbar to save changes.

Now Origin will no longer try to rename the worksheet after the data file so you'll have no trouble importing the data. (Now your worksheets will be named by the standard convention... Data1, Data2, etc.) If you want to put the file name in the window label as Edgar suggests, you can also set that up automatically...

5> Tools->Worksheet Script.
6> Check Run Script Automatically after Import.
7> Type in the following script.

page.title=3; // wks name+label in title bar
page.label$=%A; // file name in label

8> Click Update, then Cancel.
9> Save template again.

You'll end up with wks title bars that look like this...

Data2 - C034a0909iv_ex_medium.dat

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 06/06/2003 08:08:13 AM
Go to Top of Page

tib

Switzerland
105 Posts

Posted - 06/07/2003 :  02:57:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,
I completely agree as you and Edgar say that you can display the long filename as the label in the worksheet. But how do you plot the data? I cannot select and plot the data by the worksheet label. Later when I plot the data I also generate the systematic name via script. With the method you're telling me I have to plot data1, data2,.. dataN. In the graph then I will not know what is what, e.g. I will be stuck when I want to manipulate the data manually (change colors etc.) in the graph. As I said, then you must create a lookup table data1=C034...slow, data2=C034...medium, data3=C034...fast and so on. I still see no way to handle long worksheet names efficiently.
Things would be really easier if Origin would allow for longer worksheet names. I wonder wether there is an instrinic limitation by the Origin data structure? As far as I know Windows can handle filenames as long as 255 characters? Why not Origin worksheets?
Tilman.
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 06/07/2003 :  10:44:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Tilman,

I agree that the ultimate solution is to allow longer window names, but until that happens here are some suggestions for coping with the problem..

1) If you plot each worksheet separately you could just copy the filename from the worksheet title bar to the graph title bar.

2) If your graphs contain mixtures of data from different worksheets then you might consider plotting each worksheet in a separate layer. Layers can be given names that will show up instead of layer number in Plot Details. There is less restriction on the length of layer names, so you could have

layer1.name$=C034a0909iv_ex_slow;
layer2.name$=C034a0909iv_ex_medium;
layer3.name$=C034a0909iv_ex_fast;
// I chopped off the extensions only from personal tastes.

Then the Plot Details listing would look something like this...

Graph1
..C034a0909iv_ex_slow
....Data1: A(X), B(Y)
....Data1: A(X), C(Y)
..C034a0909iv_ex_medium
....Data2: A(X), B(Y)
....Data2: A(X), C(Y)
..C034a0909iv_ex_fast
....Data3: A(X), B(Y)
....Data3: A(X), C(Y)

3) If you use a legend you could arrange for the file names to show up there by using column labels. Assuming the first column is (X) then change your Worksheet script to this

page.title=3;
page.label$=%A;
loop (i,2,wks.ncols) {
%N=wks.col$(i).name$;
wks.col$(i).label$=%A_%N;
};

To show the labels in the legend...

> Close Origin
> Open Origin.ini in Notepad.
> Find the [Text] section and change the Legend entry to this

Legend=\L(%d) %%(%d, @L)\r\n

4) As a last resort the Worksheet button at the bottom of the Plot Details dialog will bring up the wks containing the selected dataset.

Hope that helps.

Mike Buess
Origin WebRing Member
Go to Top of Page

tib

Switzerland
105 Posts

Posted - 09/11/2003 :  05:41:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

thanks for your suggestion. Although I think it will work somehow, it is too complicated for me with 100 layers in a graph etc... I would have to write new scripts etc...

But back to the origin again,
that's now more a question to the

Dear Origin developers:
Can on expect a longer file name support (graphs, worksheets, etc.) in Origin 8?
Thank you for your answer,
Tilman.

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