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 for Programming
 LabTalk Forum
 import from other project file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mrandersb

25 Posts

Posted - 01/26/2011 :  01:57:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Right now I have a project file where I am "importing" data from other sheets in the project (in the set column value). Because my project is getting rather large, I would like to make a lot of different project files, and then import all important processed data into one project file.

How can I do this simple? And this a very slow process?

Anders

Sam Fang

293 Posts

Posted - 01/26/2011 :  04:45:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It seems that Origin can't import specified data from other project files using LabTalk script currently.

Sam
OriginLab Technical Services
Go to Top of Page

mrandersb

25 Posts

Posted - 01/26/2011 :  09:58:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Are there any other techniques i can use ?
Go to Top of Page

Sam Fang

293 Posts

Posted - 01/26/2011 :  10:22:34 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can use
doc -a
to append the project that you want to import to your current project, it will create a new project folder for this. After you copy your important processed data from it using script, you can use
pe_rmdir
to delete the new project folder. But it may leave some redundant info in the project.

Sam
OriginLab Technical Services

Edited by - Sam Fang on 01/26/2011 10:25:31 PM
Go to Top of Page

mrandersb

25 Posts

Posted - 01/27/2011 :  05:46:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Ok I will look into that. I can't seem to find the documentation on the doc -a command, could you give me a link?
Go to Top of Page

mrandersb

25 Posts

Posted - 01/27/2011 :  06:04:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Seems like I figured it out, but would still like to see the documentation for the two commands.

Also when for example using the command to delete, it promts with a box asking if i'm sure. I would like that it didn't do that, because I want to do it a lot of times and automatically.

When i puc the doc -a command in the "before formula scripts" and set recalculate to manual, it seems like it is set back to none, can I do something so it is kept at manual?
Go to Top of Page

Sam Fang

293 Posts

Posted - 01/28/2011 :  02:03:14 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
For the introduction of doc -a, see Help: Programming: LabTalk
Language Reference> Command Reference> Alphabetical Listing of Commands> Document

You can use folpromt:=0 pgpromt:=0 in pe_rmdir command to cancel the prompt. For more, see Help: X-Functions
Utilities> System > pe_rmdir

Recalculate mode is changed from Manual to None, maybe because range of data in the folder created by doc -a is used in "before formula scripts", but you also call pe_rmdir to delete the folder. Then the range won't exist, which will force Recalculate to None. You can copy the data if you want to set Manual.

Sam
OriginLab Technical Services
Go to Top of Page

mrandersb

25 Posts

Posted - 01/28/2011 :  03:34:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
thanks, think thats all i needed
Go to Top of Page

mrandersb

25 Posts

Posted - 01/28/2011 :  03:39:36 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
by the way. The recalculate is set back to none even if i only have

type -mb 1;
doc -a C:\Users\f040427\PhD\Origin Test\Append project test\append.opj;
type -me;

in the before formula script
Go to Top of Page

Sam Fang

293 Posts

Posted - 01/30/2011 :  02:08:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
If you didn't change columns or use columns to evaluate other columns or cells in Set Column Values dialog, then Recalculate will also be forced to None. Obviuosly your above script was in that case.

Sam
OriginLab Technical Services
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