Author |
Topic  |
|
Drbobshepherd
USA
Posts |
Posted - 01/30/2012 : 6:09:20 PM
|
Origin Ver.8.6 and Service Release 0(Select Help-->About Origin): Operating System: Windows NT
How can I access header variable data from an imported file using a LabTalk script? The Help files suggest right-clicking the worksheet window title bar, select "Show Organizer", select the inputted file, then copy-and-paste the data from the Organizer results window. However, this is not an automated process. I would like the script to read a particular header variable (not subheader) and make a conditional transfer. |
|
Penn
China
644 Posts |
Posted - 01/30/2012 : 10:18:44 PM
|
Hi,
Please try the impinfo X-Function.
Penn |
 |
|
Drbobshepherd
USA
Posts |
Posted - 01/31/2012 : 5:57:17 PM
|
Thanks, the impinfo X-function is the answer. I used this X-function but I couldn't access the data I wanted because I input multiple files. Thanks to you, I investigated further and discovered that the key to getting the header info from the correct datafile with impinfo is to set the findex variable to the correct value. E.g. findex:=0 is for the 1st datafile input, 1 is for the 2nd, -1 (default) is for the last file input.
Thanks again,
DrBobShepherd |
 |
|
Drbobshepherd
USA
Posts |
Posted - 02/01/2012 : 5:11:35 PM
|
Penn,
The information I gave you on using impinfo with the findex variable, is in error, because the Help File article describing the findex variable is inaccurate.
OriginLab,
You may want to correct the Help File article on impinfo. The description of findex in the "Variables" table currently reads:
quote: The index of the file that has been imported into the workbook. Note that the index of the first imported file is 0 and the index of the second imported file is 1... The default file index is -1, which corresponds to the last file that has been imported.
The default value of 0 is correctly listed in the "Default Value" column, but the text in the "Description" column doesn't agree, and it is not accurate. The default file index is 0, which corresponds to the last file imported into the workbook. An index of 1 corresponds to the 1st, 2 corresponds to the 2nd, etc.
DrBobShepherd |
 |
|
Penn
China
644 Posts |
Posted - 02/01/2012 : 10:08:20 PM
|
Hi DrBobShepherd,
Yes, you are right. The document is updated. Thanks for pointing out this.
Penn |
 |
|
|
Topic  |
|
|
|