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
 Forum for Origin C
 import TDM file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

chintan

India
16 Posts

Posted - 02/25/2013 :  03:12:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

chintan

India
16 Posts

Posted - 02/25/2013 :  06:48:03 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Penn

China
644 Posts

Posted - 02/25/2013 :  9:22:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi cmbhatt,

Better that you can provide simple code that is not getting compiled.

Penn
Go to Top of Page

chintan

India
16 Posts

Posted - 02/26/2013 :  03:56:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Penn

China
644 Posts

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

chintan

India
16 Posts

Posted - 02/27/2013 :  05:33:51 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Penn

China
644 Posts

Posted - 02/27/2013 :  10:01:16 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
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