LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

overwrite tdms file property names and values

Solved!
Go to solution

If we look at the code I would like that in the indicator "property names" and "property values" will be present only "NEW property name" and "NEW property values" and not the old values and the appended the desired one. Thanks

0 Kudos
Message 11 of 23
(1,421 Views)

@Arianna24 wrote:

If we look at the code I would like that in the indicator "property names" and "property values" will be present only "NEW property name" and "NEW property values" and not the old values and the appended the desired one. Thanks


Can you put some default values in the New Property Names and New Property Values control and upload the file with these values?  

0 Kudos
Message 12 of 23
(1,414 Views)

I upload again the VI with small modification in order to have some default value. Use test002 and test2 as "NEW file" and "OLD file" please. Thanks

Download All
0 Kudos
Message 13 of 23
(1,404 Views)

@Arianna24 wrote:

I upload again the VI with small modification in order to have some default value. Use test002 and test2 as "NEW file" and "OLD file" please. Thanks


Your openfile_copy.vi does not have any default values. You need to put the values into the controls and then set those values to default (go to Edit/Make Current Values Default) prior to saving the file. I'm not sure what the purpose of all of that extra code is.

0 Kudos
Message 14 of 23
(1,394 Views)

Here the code as you suggested. I did the extra code since it was nearer to the final aspect of my application.

0 Kudos
Message 15 of 23
(1,385 Views)

@Arianna24 wrote:

Here the code as you suggested. I did the extra code since it was nearer to the final aspect of my application.


Please save to LabVIEW 2019 or earlier.

0 Kudos
Message 16 of 23
(1,380 Views)

Sorry. Here previous version

0 Kudos
Message 17 of 23
(1,375 Views)

@Arianna24 wrote:

Sorry. Here previous version


Thanks. Can you please explain more clearly your problem? In the code you are copying an old file to a new file and then writing properties to the new file. You are using some property names which are the same and others which are different. The property names which are the same will overwrite the previous value. The property names which are different will make a new property. I'm assuming that you want "Operatatore" and "Autore" to be the same, for instance, but they are not. You have to use the same property names. If you need to use the different names it would be easier to copy the data from your OLD tdms to a new blank tdms and then write your properties.

0 Kudos
Message 18 of 23
(1,369 Views)

"If you need to use the different names it would be easier to copy the data from your OLD tdms to a new blank tdms and then write your properties." -> this is my case but I would like to copy the file rather than create a new one so that I would have no problem in the managment of channel and subchannel raw data. I would like to copy the tdms file, delete compleately the old property at "date set level" and set a new array of property. Is this possible?

0 Kudos
Message 19 of 23
(1,356 Views)
Solution
Accepted by topic author Arianna24

@Arianna24 wrote:

"If you need to use the different names it would be easier to copy the data from your OLD tdms to a new blank tdms and then write your properties." -> this is my case but I would like to copy the file rather than create a new one so that I would have no problem in the managment of channel and subchannel raw data. I would like to copy the tdms file, delete compleately the old property at "date set level" and set a new array of property. Is this possible?


I do not know of a way to delete existing properties, but it is not that hard to copy all of the group and channel data from one tdms file to the other. Here is a quick vi that creates an empty template (with all of the channels populated) that you can use to start your new file. You can then add your properties as you wish.

Create Empty TDMS Template.png

0 Kudos
Message 20 of 23
(1,347 Views)