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
 Read Header Variables
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Drbobshepherd

USA
Posts

Posted - 01/30/2012 :  6:09:20 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Please try the impinfo X-Function.

Penn
Go to Top of Page

Drbobshepherd

USA
Posts

Posted - 01/31/2012 :  5:57:17 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Drbobshepherd

USA
Posts

Posted - 02/01/2012 :  5:11:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Penn

China
644 Posts

Posted - 02/01/2012 :  10:08:20 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi DrBobShepherd,

Yes, you are right. The document is updated. Thanks for pointing out this.

Penn
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