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
 Naming graph "files" from user variables?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

aronkim

USA
Posts

Posted - 01/28/2008 :  4:14:16 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 8.0
Operating System:XP

I am using the import wizard to import files and (script) graph each data file in seperate graph files (or windows). The graphs that are generated are saved as "Graph 1, Graph 2.......Graph 120". The problem is the graphs are not listed in the project in order, because Origin recognizes Graph 1xx being before Graph 2. This could be fixed if Origin used placeholders such as 001 , 002.

I would like to be able label the graph files upon import to one of my user variables defined in the import wizard. How do I do this? Is it possible?

Thanks.

easwar

USA
1964 Posts

Posted - 01/28/2008 :  5:44:37 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

If you are adding script to the last page of the import wizard, you can use code such as below:


// all variables are put in page.info and that gets
// over written each time a file is imported
// get the desired variable that you extracted from header and save
string graphname$ = page.info.user.variables.runtype$;
// use whatever code to make your graph such as...
win -t p;
// I am assuming your graph page is now active
// Set the label which will be then setting the long name
page.label$ = %(graphname$);
// Show both short name and long name
page.title = 3;



There is also an x-function named impInfo which can be used to get a tree with all the import info. That can be used in your script if your script for renaming the graph is outside of the filter. Currently from inside the filter impInfo does not work as the script seems to be executing before the binary storage is created with the import information. We will look into this.

Easwar
OriginLab

Go to Top of Page

aronkim

USA
Posts

Posted - 01/28/2008 :  7:02:50 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
That worked perfect!!
I was able to add that to my small win -t script.
Now I will be able to keep track of all my graphs without opening each one.

Thanks.
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