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 Name Naming Convention
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

BryanK

Canada
26 Posts

Posted - 11/21/2013 :  08:44:09 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 9.0
Operating System: Win.7

Hello,
I was hoping for some help with likely simple naming conventions. I am doing batch import csv files and would like Origin to automatically name (long name I guess) each new table the first four characters of the *.csv.

Second, I would like the subsequent plots run to display Graph[N]_[table name] and each title on the graphs to also show "[table name] Plot".

Can anyone advise on where to start? While I am getting used to Origin, I am still relatively new to the software (and its variable codes).

Thanks a lot,
Bryan

PS - If anyone has a nice table of the Origin variable codes, I would appreciate that!

snowli

USA
1379 Posts

Posted - 11/21/2013 :  1:19:50 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Bryan,

Here is how to import csvs with only 1st 4 characters of the file name.

Choose File: Import: Import CSV.
Select all the csv files you want to import and click OK.
In the subsequent ImpCSV dialog,
Expand Import Options-> (Re)Naming Worksheet and Workbook node.
Check Rename Sheet with (Partial) File Name.
Trim Filename from 1.
Trim Filename to 4.

You can also do the same for "Rename Book with (Partial Filename" part.
Click OK
--> only 1st 4 chars of the file name will show as worksheet names of each import.


Then after you plot a graph with data from one sheet, you can right click on blank area of graph and choose Add/Modify Layer Title.
Then u can see Layer Title added and highlighted. u can type any name as title or with all text highlighted (inplace edit mode), right click and choose Insert Info. Variables...
In right side of the dialog, you can choose the Sheet node, and then on Label tab, select Name row. (uncheck "Insert as Property = Value").
Click Insert. Then click Close to close the db.
--> The sheet name will be inserted as as layer title, e.g. %(Y, @WS). You can add any text after it. Then click outside the text box to get out of the inplace edit mode. U will see the title with sheet name included.

As to how to make the graph title to include the sheet name, I will ask coworkers to check and update you.

Thanks, Snow
OriginLab Corp.
Go to Top of Page

lkb0221

China
497 Posts

Posted - 11/21/2013 :  2:14:36 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Bryan,

Sorry there might not have a direct way to let window long name to detect sheet name. But you can do the following to implement this:

1. Right click the layer title you created as Snow suggested and select "Programming Control..."
2. In the dialog, input as below


You may take a look at the link below to see more info about @ notation:
http://www.originlab.com/doc/LabTalk/ref/Legend-Substitution-Notation

Zheng
OriginLab
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