DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding TDMS File properties with C API

Solved!
Go to solution

I'm using the free C API (dll) to write TDMS files. Everything works perfect except the following function call.

int __stdcall DDC_CreateFilePropertyString (DDCFileHandle file,
			const char *property,
		                const char *value);

 I call the following function in advance to create the TDMS file.

int __stdcall DDC_CreateFile (const char *filePath,
			const char *fileType,
			const char *name,
			const char *description,
			const char *title,
			const char *author,
		         DDCFileHandle *file);

 When i call the function to create the property it returns with the error code -6202 (invalid argument). I don't think there is an invalid argument in my call. Does anyone have some example code? Do I have to do something before i can create a property?

 

Thanks for your help.

 

 

0 Kudos
Message 1 of 4
(4,958 Views)
Solution
Accepted by topic author DevKev

Does

DDC_CreateFilePropertyString (file, "MyProperty", "MyValue");

 work?

0 Kudos
Message 2 of 4
(4,950 Views)

I just tried that (i'm sure i tried it before but with different values) and it worked. I'm very confused. I alwys tried it with "Test Property" and "Test Value". I figured out that its not possible to have the word "property" in your property name. It works if you don't use a space in between. Weired but true. Thanks a lot. 

0 Kudos
Message 3 of 4
(4,915 Views)

Hi DevKev,

 

The only allowable characters in a property name are the letters "A - Z" the numbers "0 - 9" and the underscore character ("_"), and the property name can not start with a number.  These limitations make everything easier in the DataFinder data base and the underlying SQL queries that you send to it with DIAdem or LabVIEW.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 4
(4,896 Views)