T O P I C R E V I E W |
hkkim |
Posted - 09/27/2012 : 03:56:18 AM Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.1 Operating System: Windows XP
Hello! My question is about a batch processing. Here is my example below. The location of 'InputDesign.xlsx' is hardwired now. Is it possible to designate the path variablely using a DOS command argument ? How can I get 'D:\Origin\' from 'Run.bat' in 'ReadDraw.ogs' ?
Thanks in advance! hkkim ---------------------------------------------------------- Run.bat: Origin81.exe -r (run.section(D:\Origin\ReadDraw.ogs,main)) ---------------------------------------------------------- ReadDraw.ogs: .... newbook; // create new workbook before string fn$=D:\Origin\InputDesign.xlsx; if(0 == exist(fn$) ) return; // Check for 'not exist' impexcel fname:=fn$; // Import Excel file ---------------------------------------------------------- |
2 L A T E S T R E P L I E S (Newest First) |
hkkim |
Posted - 09/28/2012 : 01:29:38 AM Hello, Penn!
My question was solved with your help. I checked LabTalk Wiki site as your suggestion. Thank you so much! Happy thanksgiving day! ^:^
hkkim |
Penn |
Posted - 09/27/2012 : 05:57:40 AM Hi hkkim,
You can read the document for run.section() here. You can provide the argument for this method to pass into the section in the ogs. Maybe you can try:
Run.bat: Origin81.exe -r run.section(D:\Origin\ReadDraw.ogs, main, "D:\Origin\")
ReadDraw.ogs: ... string fn$=%1InputDesign.xlsx; // if you hope to use here, %1 hold the first argument passed by the run.section method ...
Penn |