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
 batchProcess to Import and Export
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

amohammed6175

USA
4 Posts

Posted - 11/07/2015 :  09:41:01 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. OriginPro 2015
Operating System:windows 7 enterprise

i wish somebody can help me with this

i used this script programmed on the button to import all the files with DAT extension in this folder and this part worked ok

string fname$, path$="C:\LPP_Camera\Data_Camera1";
findfiles fname:=fname$ ext:="*.dat";
batchProcess name:="C:\LPP_Camera\LPP Workbook - Camera_1 Thermo_Updated.ogw" fill:=4_r1 append:=<none> loopscript:=<[<

but when i added this script to run after every file for export
did not worked but it was working when i use it without using first part above [see screenshot]

range rr = [%H]2!;
%A = layer1.name$;
expASC iw:=rr type:=csv path:="C:\LPP_Camera\Data_Camera1\%A" longname:=0;




Ahmed Mohamed

jasonzhao

China
262 Posts

Posted - 11/08/2015 :  9:01:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

Would you please explain again which part of the script is the "first part above"?


string fname$, path$="C:\LPP_Camera\Data_Camera1"; 
findfiles fname:=fname$ ext:="*.dat"; 
batchProcess name:="C:\LPP_Camera\LPP Workbook - Camera_1 Thermo_Updated.ogw" fill:=4_r1 append:=<none> loopscript:=<[< 


Do you mean this part?

Best regards!
Jason
OriginLab Technical Service

Edited by - jasonzhao on 11/08/2015 9:02:48 PM
Go to Top of Page

amohammed6175

USA
4 Posts

Posted - 11/09/2015 :  09:12:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
i was trying to say i am using right now the following :


and all is working ok , but i want to automate the selection of the .DAT in that directory by programming a button on the first page to Import and export.

it actually import all files but nothing was exported




Ahmed Mohamed
Go to Top of Page

jasonzhao

China
262 Posts

Posted - 11/09/2015 :  10:16:59 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

How about use doc command to export all files in project:

http://www.originlab.com/doc/LabTalk/ref/Document-cmd#-e_object_.7Bscript.7D.3B_Execute_the_given_script_for_all_objects

For example:

doc -e w
{
expASC iw:=[%H]1! type:=0 path:=D:\TEST+%H.DAT separator:=TAB;
}

Or you can send your OPJ with script and sample files to tech@originlab.com for a further test.


Best regards!
Jason
OriginLab Technical Service

Edited by - jasonzhao on 11/11/2015 10:14:05 PM
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