Author |
Topic |
|
chintan
India
16 Posts |
Posted - 02/25/2013 : 03:12:57 AM
|
is there any default function format to import .TDM (National Instrument File format) data files to Origin Worksheet?? if not please let know how to write function for the same.
please help.
cmbhatt |
|
Penn
China
644 Posts |
Posted - 02/25/2013 : 05:08:01 AM
|
Hi cmbhatt,
The simple way is to use the impNITDM X-Function. For Origin C, you can use the LT_execute function to call X-Function as LabTalk command.
Penn |
|
|
chintan
India
16 Posts |
Posted - 02/25/2013 : 06:48:03 AM
|
thanks Penn, i have added this command but the code is not getting compiled, which header file needs to be added with the code to support this function??
cmbhatt |
|
|
Penn
China
644 Posts |
Posted - 02/25/2013 : 9:22:04 PM
|
Hi cmbhatt,
Better that you can provide simple code that is not getting compiled.
Penn |
|
|
chintan
India
16 Posts |
Posted - 02/26/2013 : 03:56:35 AM
|
Hi Penn, sorry to bother you but i do not know how to write a simple code also. please help. i need to know which .h file needs to be added to the program to run it without compilation error.
i am a biginner please help.
cmbhatt |
|
|
Penn
China
644 Posts |
Posted - 02/26/2013 : 8:01:25 PM
|
Hi cmbhatt,
By default, the header file Origin.h is needed, which is included automatically when you create a c or cpp source file in Code Builder. My testing simple code is
void test_impNITDM()
{
LT_execute("impNITDM -d;");
}
And this code works in my computer. If this simple code works in your computer too, I think the problem is not related to impNITDM, maybe other problems.
Penn |
|
|
chintan
India
16 Posts |
Posted - 02/27/2013 : 05:33:51 AM
|
thanks a lot. it is working fine. now the issue is when i load my .tdm file it is not loading. do i need to create a template for the data to be loaded or something else i need to do. i have 14 worksheets in a .tdm file and want to load all of them in one workbook how to do it using this impTDM please follow the your sample code to explain it. because it is working for me. it will be easy for me to update it in my code.
once again thanks a lot.
cmbhatt |
|
|
Penn
China
644 Posts |
Posted - 02/27/2013 : 10:01:16 PM
|
Hi cmbhatt,
You can try the menu File: Import: NI TDM(TDM, TDMS)..., then select the file you want to import, and make sure the Show Options Dialog check-box is checked. Then you will open the dialog. In the File Info and Data Selection branch, Origin will import each Group data into one worksheet by default. And in the Import Options branch, there is a check-box Import All Groups to Same Worksheet, if checked, all groups are imported into one worksheet. So, if the "14 worksheets in a .tdm file" is meaning 14 groups in a .tdm file, Origin can handle it for you requirement. If not, I am afraid you need to handle by yourself after import the data.
Penn |
|
|
|
Topic |
|