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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 batchProcess to Import and Export

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
amohammed6175 Posted - 11/07/2015 : 09:41:01 AM
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
3   L A T E S T    R E P L I E S    (Newest First)
jasonzhao Posted - 11/09/2015 : 10:16:59 PM
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
amohammed6175 Posted - 11/09/2015 : 09:12:48 AM
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
jasonzhao Posted - 11/08/2015 : 9:01:47 PM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000